Re: Reason of Slowness of query - Mailing list pgsql-performance

From Vitalii Tymchyshyn
Subject Re: Reason of Slowness of query
Date
Msg-id 4D89A06E.2020202@gmail.com
Whole thread Raw
In response to Reason of Slowness of query  (Adarsh Sharma <adarsh.sharma@orkash.com>)
List pgsql-performance
23.03.11 08:28, Adarsh Sharma написав(ла):

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 ;
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".

Best regards, Vitalii Tymchyshyn.

pgsql-performance by date:

Previous
From: Samuel Gendler
Date:
Subject: Re: Reason of Slowness of query
Next
From: Adarsh Sharma
Date:
Subject: Re: Reason of Slowness of query