Re: Any body know --- 'sql query where condition execution plan'

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Any body know --- 'sql query where condition execution plan'
Дата
Msg-id 12907.1011674965@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Any body know --- 'sql query where condition execution plan'  (raja kumar thatte <trajakumar@yahoo.com>)
Список pgsql-admin
raja kumar thatte <trajakumar@yahoo.com> writes:
> I want to know how the--where condition--is executed in a sql query.
> e.g., select aa,bb,cc from ttt where aa=100 and bb = 200 and cc =300.
> my doubt is , will psql leave the record as on when it fails to satisfy a record having aa !=100
> or will it chect for bb = 200 and cc = 300 also.
> ie will it work like C-language if condition or not.
> If i give paranthesis, will it change the execution plan accordingly.

The planner will make its own decisions about which query plan to
follow; it's quite impervious to parentheses, clause order, or any
other semantically-insignificant details in the WHERE clause.

You may care to read the chapter on performance tips in the User's
Guide.

            regards, tom lane

В списке pgsql-admin по дате отправления:

Предыдущее
От: raja kumar thatte
Дата:
Сообщение: Any body know --- 'sql query where condition execution plan'
Следующее
От: "Dong Meng"
Дата:
Сообщение: A question about PG Authorization