Tom Lane escribió: > Robert Haas <robertmh...@gmail.com> writes: > > This seems like it could potentially introduce a performance > > regression, but the current behavior is so bizarre that it seems like > > we should still change it. > > Yeah, it could definitely run slower than the existing code --- in > particular the combination of all three (FOR UPDATE ORDER BY LIMIT) > would tend to become a seqscan-and-sort rather than possibly just > reading one end of an index. However, I quote the old aphorism that > it can be made indefinitely fast if it doesn't have to give the right > answer. The reason the current behavior is fast is it's giving the > wrong answer :-(
So this probably merits a warning in the release notes for people to check that their queries continue to run with the performance they expect. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers