Re: How to optimize this query ?
От | Stephan Szabo |
---|---|
Тема | Re: How to optimize this query ? |
Дата | |
Msg-id | 20030827181401.K85397-100000@megazone.bigpanda.com обсуждение исходный текст |
Ответ на | How to optimize this query ? (proghome@silesky.com (krystoffff)) |
Список | pgsql-sql |
On Wed, 27 Aug 2003, ProgHome wrote: > You were right, Stephan ! > The query below is still not correct ... because the second line > shouldn't be shown ! > Now I really don't know how I could rewrite this without a subquery > because it doesn't seem to be possible with some LEFT or INNER joins ! > Do you have an idea ? The only ways I can think of are through a subquery (*) or possibly there might be a way to do it with EXCEPT, but on first blush that seems like it might be difficult and probably not any better speed wise. (*) - You were using IN (subquery) which is known to be poorly optimized for 7.3 and earlier. You might want to see how it performs on your data under 7.4beta for forward looking, and/or consider converting into a form using EXISTS rather than IN.
В списке pgsql-sql по дате отправления: