Re: order of evaluation of search arguments

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: order of evaluation of search arguments
Дата
Msg-id 1122.1329371056@sss.pgh.pa.us
обсуждение исходный текст
Ответ на order of evaluation of search arguments  (Kiriakos Georgiou <kg.postgresql@olympiakos.com>)
Ответы Re: order of evaluation of search arguments  (Kiriakos Georgiou <kg.postgresql@olympiakos.com>)
Список pgsql-general
Kiriakos Georgiou <kg.postgresql@olympiakos.com> writes:
> As I understand it the order the of evaluation of search arguments is up to the optimizer.  I've tested the following
query,that is supposed to take advantage of advisory locks to skip over rows that are locked by other consumers running
theexact same query and it seems to work fine.  It seems to me the optimizer should always prefer to scan by status.
Whatsay you? 

"When it breaks, you get to keep both pieces."  Was your testing even
capable of noticing the problem if the query locked more rows than you
wanted?

Less dangerous coding practices might involve putting the lock function
in an outer query, while using an OFFSET 0 in the sub-query as an
optimization fence.

            regards, tom lane

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

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: Postgres 9.1 package for i.MX51X processor from Freescale
Следующее
От: Venkat Balaji
Дата:
Сообщение: Re: [GENERA]: Postgresql-9.1.1 synchronous replication issue