Amir Michail wrote:
It's slow with setMaxRows.
Are you sure you have the correct indexes on whatever you're using for your condition? Try getting an explanation of your query to see what it's actually doing.
I can confirm that the row_number() approach is slow (it's the current best workaround for the k..(2k-1) problem as far as I know) but I haven't noticed the same thing with setMaxRows.
Daniel -- Daniel Noll Forensic and eDiscovery Software Senior Developer The world's most advanced Nuix email data analysis http://nuix.com/ and eDiscovery software