db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Noll <dan...@nuix.com>
Subject Re: getting first k rows from a query that satisfy some additional condition
Date Mon, 27 Oct 2008 21:58:11 GMT
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 Noll                            Forensic and eDiscovery Software
Senior Developer                              The world's most advanced
Nuix                                                email data analysis
http://nuix.com/                                and eDiscovery software

View raw message