query a number of rows in sqlite ordered data faster?

listed in answer

query a number of rows in sqlite ordered data faster?
0 votes, 0.00 avg. rating (0% score)

ANSWER:

I am not sure of what you mean but I will try to answer. Sorry by advance if I am out of the track.

Let consider that your string column is called mystring. If you want to have good performance when selecting with a specific order, you have to have an index on the column you want to sort.

Your query will look like that :

SELECT *
FROM mytable
ORDER BY mystring
LIMIT 5,10

That is the fastest solution to do it.

by tibo from http://stackoverflow.com/questions/10763472