Re: Another optimizer question

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Another optimizer question
Дата
Msg-id
5258.979853409@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Re: Outer Joins "Poul L. Christiansen" <poulc@cs.auc.dk>
Re: Outer Joins "Robert B. Easter" <reaster@comptechnews.com>
Re: Outer Joins Tom Lane <tgl@sss.pgh.pa.us>
Re: Outer Joins "Robert B. Easter" <reaster@comptechnews.com>
Re: Outer Joins "Robert B. Easter" <reaster@comptechnews.com>
Re: Outer Joins Tom Lane <tgl@sss.pgh.pa.us>
Re: Outer Joins "Robert B. Easter" <reaster@comptechnews.com>
Re: Outer Joins Tom Lane <tgl@sss.pgh.pa.us>
Re: Outer Joins Bruce Momjian <pgman@candle.pha.pa.us>
Re: Outer Joins "Robert B. Easter" <reaster@comptechnews.com>
Re: Outer Joins Tom Lane <tgl@sss.pgh.pa.us>
Re: Outer Joins Bruce Momjian <pgman@candle.pha.pa.us>
Re: Outer Joins Tom Lane <tgl@sss.pgh.pa.us>
JRelationalFramework Erik Tennant <lists@webpd.com>
Re: Outer Joins "Brett W. McCoy" <bmccoy@chapelperilous.net>
"Gordan Bobic"  writes:
> SELECT * FROM Table1 INNER JOIN Table2 ON (Table1.Field1 = Table2.Field1)
> WHERE Table1.Field1 = 'SomeValue';
> [ is slow, but this is fast: ]
> SELECT * FROM Table1 INNER JOIN Table2 ON (Table1.Field1 = Table2.Field1)
> WHERE Table1.Field1 = 'SomeValue' AND Table2.Field1 = 'SomeValue';

You're correct, we do not deduce the latter from the former, and so the
first example does not realize that it could use a constrained indexscan
over Table2.

Maybe we should try to do this, but I suspect we'd waste more cycles
trying than we'd make back on the queries where it helps.

			regards, tom lane
В списке pgsql-general по дате отправления
От: Oliver Elphick
Дата:
Сообщение: Re: Troubles with performances
От: Adam Lang
Дата:
FAQ