On 10/14/2011 09:34 PM, Fabian wrote:
2011/10/14 Dan Kennedy<danielk1...@gmail.com>


If SQLite cannot use an index to for an ORDER BY in a SELECT
query and has to do an external sort, the EXPLAIN QUERY PLAN
output will have something like this in it:

  0|0|0|USE TEMP B-TREE FOR ORDER BY


Since my EXPLAIN does not show this, what else could be the cause for the
large decrease in performance when ordering by rowid?

Good question. Can you enter the following commands into
the shell tool and post the complete output (no "QUERY PLAN"
this time):

  .version
  .schema
  .explain

EXPLAIN SELECT * FROM table1 WHERE data=10 ORDER BY rowid LIMIT 250 OFFSET 500000;

  EXPLAIN SELECT * FROM table1 WHERE data=10 LIMIT 250 OFFSET 500000;


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

Reply via email to