Limit 1 says to stop after returning 1 row.  If the "first row" being searched 
is not the one containing "the answer" then the search will continue until the 
row that does not match the index constraint is hit, after which it is known 
that no answer is possible (without returning a row).


---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.


>-----Original Message-----
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of siscia
>Sent: Friday, 26 October, 2018 01:49
>To: sqlite-users@mailinglists.sqlite.org
>Subject: Re: [sqlite] Optmize queries on ranges
>
>Ok, after the message I thought a little bit more.
>
>And it turns out that in the database the `start`s are not unique how
>they
>should.
>Making them unique, seems to solve the performance problem
>completely.
>
>However, still, I am not sure why the `LIMIT 1` does not help at all.
>
>Can you guys shed some light on this?
>
>Cheers,
>Simone
>
>
>
>--
>Sent from: http://sqlite.1065341.n5.nabble.com/
>_______________________________________________
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



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

Reply via email to