Re: [sqlite] [EXTERNAL] The "natural" order of the query results.

2018-09-17 Thread Richard Damon
On 9/17/18 2:19 AM, John Found wrote: > On Mon, 17 Sep 2018 06:02:37 + > Hick Gunter wrote: > >> SQLite handles GROUP BY and ORDER BY in basically the same way. If there is >> an apropirate index, then it will use this index and the rows will be >> returned in visitation order of this

Re: [sqlite] [EXTERNAL] The "natural" order of the query results.

2018-09-17 Thread Graham Holden
y Three Original message From: Simon Slavin Date: 17/09/2018 09:09 (GMT+00:00) To: SQLite mailing list Subject: Re: [sqlite] [EXTERNAL]  The "natural" order of the query results. On 17 Sep 2018, at 7:19am, John Found wrote: > Yes, of course, but you fo

Re: [sqlite] [EXTERNAL] The "natural" order of the query results.

2018-09-17 Thread Simon Slavin
On 17 Sep 2018, at 7:19am, John Found wrote: > Yes, of course, but you forgot about INDEXED BY clause. It will force using > particular index. So, the query planner will always use exactly this index, > regardless of how optimal it is and > as long as GROUP BY and ORDER BY are working the same

Re: [sqlite] [EXTERNAL] The "natural" order of the query results.

2018-09-17 Thread John Found
arly, if you need the result columns to have certain names, you must > provide these via AS clauses. > > -Ursprüngliche Nachricht- > Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im > Auftrag von John Found > Gesendet: Sonntag, 16. September 2018 10:30

Re: [sqlite] [EXTERNAL] The "natural" order of the query results.

2018-09-17 Thread Hick Gunter
: [EXTERNAL] [sqlite] The "natural" order of the query results. Is there some relation between the indexes used in the query, the GROUP BY fields used and the order of the result rows, when no "ORDER BY" clause is used? I am asking, because I noticed, that on some queries, when I a