Ok, random setting of the pragma, not completely random order of records. Makes infinitely more sense.
(I probably should've picked up on that. Bad me, no biscuit. (This is your brain on not enough sleep kids)) -----Original Message----- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Richard Hipp Sent: Thursday, January 12, 2017 3:35 PM To: SQLite mailing list Subject: Re: [sqlite] Why this query plan? On 1/12/17, David Raymond <david.raym...@tomtom.com> wrote: > > In the same vane I assume DRH's random ordering would be only random by page > of results. If you have 100+ million records in a table then keeping track > of which ones you've randomly picked so far would cripple systems with the > tracking requirements and with the slowdown of skipping all over the file. > Shuffling the order is one thing, killing performance is another. > The idea is that as each new database connection is opened, the reversed_unordered_selects pragma (https://www.sqlite.org/pragma.html#pragma_reverse_unordered_selects) would be enabled or disabled at random. That means that results might be backwards from one run to the next, but within the same run they would always be the same. That is not really "random" but I think it should be sufficient to find instances of omitted ORDER BY clauses, at least for the case where the developers test their application more than once or twice. -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users