Well, it is only pragma, so you can take it or leave it. RBS
On 12 Jan 2017 20:56, "David Raymond" <david.raym...@tomtom.com> wrote: > Well, then you're handcuffing it when an index would be better but is in > nowhere near rowid order. > > > -----Original Message----- > From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] > On Behalf Of Bart Smissaert > Sent: Thursday, January 12, 2017 3:53 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Why this query plan? > > How about a > pragma_sort_asc_on_rowid_or_primary_integer_key_for_unordered_selects ? > > RBS > > On 12 Jan 2017 20:35, "Richard Hipp" <d...@sqlite.org> wrote: > > > 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 > _______________________________________________ > 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