Re: sub-select with aggregate
От | Stephan Szabo |
---|---|
Тема | Re: sub-select with aggregate |
Дата | |
Msg-id | 20021024093022.A21018-100000@megazone23.bigpanda.com обсуждение исходный текст |
Ответ на | Re: sub-select with aggregate ("Tomasz Myrta" <jasiek@klaster.net>) |
Ответы |
Re: sub-select with aggregate
|
Список | pgsql-sql |
On Thu, 24 Oct 2002, Tomasz Myrta wrote: > > The system doesn't realize that it can limit the subquery when the only > > things it has is the join clause and the limiting clause on the other > > table. Like Tom's message about the other view, it won't imply that > > X.foo=12345 from foo=12345 when the exposed foo is B.foo. > > Is this what we should expect, or rather a bug? > The system knows how to join tables, but fails with joining views or > subselects :-( It knows how to join them, it doesn't know that it can change the clauses given to it in order to make it more efficient. Basically, as I understand it,select * from a,b where a.a=b.a and a.a=3; isn't going to realize that b.a=3 and act as if you typed that. It may consider an index scan in a nested loop for a.a=b.a, but that's not quite the same.
В списке pgsql-sql по дате отправления: