db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Dudgeon <tdudg...@informaticsmatters.com>
Subject Re: Perfroamnce of IN ( ... list ... ) statements
Date Mon, 06 Oct 2008 08:58:26 GMT
derby@segel.com wrote:
> There was an issue with earlier versions of Derby, that was supposed to 
> have been fixed.
> 
>  
> 
> Even so, the performance of the IN clause where you have a large list is 
> going to be an issue in most databases.

I'm running against 3 different databases. With Oracle and MySQL IN 
clause performance is satisfactory. With Derby it is not and its much 
faster to retrieve each row individually, which seems to indicate that 
something is amiss.

Tim

> 
>  
> 
>  
> 
> ------------------------------------------------------------------------
> 
> *From:* Peter Ondruška 
> [mailto:peter.ondruska@gmail.com]
> *Sent:* Sunday, October 05, 2008 3:12 PM
> *To:* Derby Discussion
> *Subject:* Re: Perfroamnce of IN ( ... list ... ) statements
> 
>  
> 
> What Derby version is it?
> 
> How does it perform if you re-create index on foo_id column?
> 
>  
> 
> p. 
> 
> On Sun, Oct 5, 2008 at 10:07 PM, Tim Dudgeon 
> <tdudgeon@informaticsmatters.com 
> <mailto:tdudgeon@informaticsmatters.com>> wrote:
> 
> If I run a statement like this is Derby:
> SELECT COL1, COL2 FROM FOO WHERE FOO_ID IN ( 1, 31, ..... 4567)
> it seems unexpectedly slow. Its actually faster to retrieve each row 
> individually using a for loop that it is to use the IN ( ..  list ... ) 
> clause. This seems strange.
> 
> Thanks
> 
> Tim
> 
>  
> 


Mime
View raw message