db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nurullah Akkaya <nurullah_akk...@yahoo.com>
Subject Re: how to query certain number of rows in derby
Date Fri, 16 Mar 2007 16:33:17 GMT
be careful while using it it does not effect performence where as in  
mysql and others it does derby will retrive all rows but return only  
what you set through setMaxRows  had a similar problem  i was using  
limit to get only a single row in mysql query returned instantly with  
a single row but with derby it took around 15 seconds it was reading  
everything if you set setMaxRows or not. my work around was read them  
1000 at a time cache in the application then use them one by one.

Nurullah Akkaya

Tel: +1 (256) 270 4091

On Mar 16, 2007, at 3:04 PM, John H. Embretsen wrote:

> ccl007 wrote:
>> you know in mysql ,we can use limit to query certain number of  
>> rows from a
>> table in database like select * from table1 limit 2,7; what kind  
>> of sql
>> language should i use in derby to perform the same kind of  
>> function in derby
> I believe you have hit FAQ 5.2:
> http://db.apache.org/derby/faq.html#limit
> If the answer to the FAQ is not satisfactory, you can vote for the
> relevant JIRA issue(s) that suggest similar functionality in Derby  
> SQL (I found
> http://issues.apache.org/jira/browse/DERBY-581), and/or get  
> involved in
> Derby development and help implement a solution... ;)
> Tip: Search for "limit" in Nabble
> (http://www.nabble.com/Derby-f356.html) to review similar requests and
> their answers.
> -- 
> John

View raw message