Re: Re-Reason of Slowness of Query
| От | Chetan Suttraway |
|---|---|
| Тема | Re: Re-Reason of Slowness of Query |
| Дата | |
| Msg-id | AANLkTim1XkLf0NkiaffBj8-LNx3+sUuggyYjzO=a-+rT@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Re-Reason of Slowness of Query (Adarsh Sharma <adarsh.sharma@orkash.com>) |
| Список | pgsql-performance |
On Wed, Mar 23, 2011 at 3:49 PM, Adarsh Sharma <adarsh.sharma@orkash.com> wrote:
I can't understand how select 1 from clause2 c where c.source_id = p.crawled_page_id works too, i get my output .Vitalii Tymchyshyn wrote:23.03.11 12:10, Adarsh Sharma написав(ла):I just want to retrieve that id 's from page_content which do not have any entry in clause2 table.Then
select distinct(p.crawled_page_id) from page_content p
where NOT EXISTS (select 1 from clause2 c where c.source_id = p.crawled_page_id);
is correct query.
What is the significance of 1 here.
Thanks , AdarshBest regards, Vitalii Tymchyshyn.
Its the inverted logic for finding crawled_page_id not matching with source_id.
Actually, the idea was to force index scan on clause2 though.
--
Regards,
Chetan Suttraway
EnterpriseDB, The Enterprise PostgreSQL company.
В списке pgsql-performance по дате отправления: