On 3/3/15, Jan Asselman <jan.asselman at iba-benelux.com> wrote: > > Most of my queries are in the form > "SELECT * FROM test WHERE a == ? AND b < ?;" > and use the primary key index so that the rows are returned in the expected > order without using the ORDER BY statement.
Do not rely on this behavior! It might change at any moment! If you omit the ORDER BY clause, the database engine is free to return rows in any order it chooses. SQLite sometimes uses this freedom to choose non-intuitive query plans that run faster. It might use this freedom even more in the future, thus breaking your application if you omit the ORDER BY clause. -- D. Richard Hipp drh at sqlite.org