Search Postgresql Archives

Re: Reasons to reorder results *within* a transaction?

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

 



Evan Jones wrote:
> I *know* that without an ORDER BY clause, the database is free to
> reorder results in any way it likes. However, I recently ran into a
> case where the *SAME* query was returning results in a different order
> *within* a single transaction, which surprised me (we fixed it by
> adding the missing ORDER BY). I would assume that once a transaction
> obtains a snapshot, all its read operations would return the same
> results.

Yes, the same results -- not necessarily in the same order.  For
instance, a synchronized scan might start at a different point of the
table.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


-- 
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