Simon,
I don't know whether my posts have a delay with delivery (replied several
hours ago to the discussion you mentioned), but actually I tested 100 rows
before and after with a similar query (ORDER BY LIMIT) and it definitely
shows that sqlite saves time and doesn't go further. Do you have reason to
think that it should go to the end?

Max

On Sat, Aug 28, 2010 at 7:03 PM, Simon Slavin <slav...@bigfraud.org> wrote:

> Can someone check the source code for me ?  Or perhaps this can be found
> from a query plan or something.
>
> A current discussion reminded me that something was never settled to my
> satisfaction.  If I use LIMIT in a SELECT, e.g.
>
> SELECT name,address,(residents-1) FROM contacts WHERE postcode>'N" ORDER BY
> postcode LIMIT 100
>
> and I do actually have an index on the postcode column, does SQLite process
> all the rows to the end of the index, then trim them to the first 100 rows,
> or does it realise it needs only the first 100 rows ?
>
> If the question doesn't make sense, imagine that my 'contacts' table has
> ten million rows in.  I'm trying to work out whether it'll take a lot of
> time.
>
> Simon.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to