Ahh... very clever.
Just to get it right. Since the index is on binB I assume that binA and
binB should be switched in your examples.
Thanks a lot, I'll try it out


On Wed, Feb 5, 2014 at 11:04 AM, Noel Grandin <[email protected]> wrote:

> You could so something like:
>
> SELECT binA, binB FROM myTable ORDER BY binA LIMIT 10000
>
> and then store the last binA value you receive and go:
>
> SELECT binA, binB FROM myTable WHERE binA > lastBinAValueFromPreviousSelect
> ORDER BY binA LIMIT 10000
>
> and repeat that until you have processed all the data.
>
> Which should be reasonably snappy because it can use the primary index to
> locate the data efficiently.
>
>
> On 2014-02-05 11:43, Jan Møller wrote:
>
>>
>> On startup I wish to read through it all to generate a graph, so
>> basically: read next element, do something, rinse and
>> repeat
>>
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "H2 Database" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/h2-database/KhbJSGdhLcM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to