Search Postgresql Archives

Re: order of evaluation of search arguments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kiriakos Georgiou <kg.postgresql@xxxxxxxxxxxxxx> 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 the exact same query and it seems to work fine.  It seems to me the optimizer should always prefer to scan by status.  What say 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux