On 20 Nov 2014, at 9:48pm, Oliver Smith <oli...@kfs.org> wrote:

> The t2c table has an index on id, name; I expected it would use that index so 
> that the data would be naturally in order.

As you've found, you cannot rely on this.  If you need an answer to a query to 
be in a specific order, specify it using ORDER BY.  It's the only way to be 
sure.

Don't try to second-guess the optimizer.  It occasionally does things that seem 
weird just because the numbers suggest they're optimal.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to