Re: Recursive optimization of IN subqueries
| От | Simon Riggs |
|---|---|
| Тема | Re: Recursive optimization of IN subqueries |
| Дата | |
| Msg-id | 002e01c3e4e4$d638a9e0$5e00030a@LaptopDellXP обсуждение исходный текст |
| Ответ на | Re: Recursive optimization of IN subqueries (Dennis Haney <davh@diku.dk>) |
| Список | pgsql-hackers |
My mistake then. Better to check than let a logical hole in… Thanks for letting me know, Simon
-----Original Message-----
From: pgsql-hackers-owner@postgresql.org [mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of Dennis Haney
Sent: Tuesday, January 27, 2004 14:33
To: simon@2ndquadrant.com
Cc: 'Tom Lane'; pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Recursive optimization of IN subqueries
Simon Riggs wrote:
Tom Lane writesIn the second place, what the code is doing is dependent on anunderstandingof the semantics of IN; I'm not sure it's applicable to, say,WHERE outervar > ANY (SELECT innervar FROM ...)and it's definitely not applicable toWHERE outervar > ALL (SELECT innervar FROM ...)In particular, the optimization paths that involve unique-ifying thesubselect output and then using it as the outer side of a join woulddefinitely not work for these sorts of things.
I'm not sure if I've understood you correctly in the section above. Areyou saying that these types of queries don't have a meaningful ordefined response? Or just that they wouldn't be very well optimized as aresult of the unique-ifying code changes? Or have I just mis-read thethread... I think Tom is refering to the context of the specific optimization.
The optimization we are discussing does nothing to correlated subqueries, and a uncorrolated subquery with > ALL/ANY is actually a computed constant and not a join.
-- DennisВ списке pgsql-hackers по дате отправления: