Re: Reason of Slowness of query
От
Vitalii Tymchyshyn
Тема
Re: Reason of Slowness of query
Дата
Msg-id
4D89A06E.2020202@gmail.com
Ответ на
Reason of Slowness of query (Adarsh Sharma)
Список
Дерево обсуждения
Reason of Slowness of query Adarsh Sharma <adarsh.sharma@orkash.com>
Re: Reason of Slowness of query Vitalii Tymchyshyn <tivv00@gmail.com>
Re: Reason of Slowness of query Chetan Suttraway <chetan.suttraway@enterprisedb.com>
Re: Reason of Slowness of query Adarsh Sharma <adarsh.sharma@orkash.com>
Re: Reason of Slowness of query Vitalii Tymchyshyn <tivv00@gmail.com>
Re: Reason of Slowness of query Samuel Gendler <sgendler@ideasculptor.com>
Re: Reason of Slowness of query Chetan Suttraway <chetan.suttraway@enterprisedb.com>
23.03.11 08:28, Adarsh Sharma написав(ла):
Best regards, Vitalii Tymchyshyn.
Your query is wrong. This query will return every crawled_page_id if clause2 has more then 1 source_id. This is because DB will be able to find clause with source_id different from crawled_page_id. You need to use "not exists" or "not in".
I perform a join query on it as :
explain analyze select distinct(p.crawled_page_id) from page_content p , clause2 c where p.crawled_page_id != c.source_id ;
Best regards, Vitalii Tymchyshyn.
В списке pgsql-performance по дате отправления