db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Chisholm <christopher.chish...@syamsoftware.com>
Subject query works on 10.2, feezes with high CPU on 10.3 and above
Date Fri, 11 Jun 2010 22:22:23 GMT

I've had derby database backing a java application for some 
time now.  The following query has always worked with a fairly large 
database in about 6-8 seconds on my machine:

SELECT A.Name, A.Version, A.Vendor, count(*) from Applications A INNER 
JOIN ManagedSystems M ON M.ManagedSystem_ID = A.ManagedSystem_ID WHERE 
M.Active=1 AND M.ManagedSystem_ID  IN (SELECT DISTINCT(ManagedSystem_ID) 
FROM Applications WHERE upper(Name) LIKE '%MICROSOFT%') GROUP BY A.Name, 
A.Version, A.Vendor ORDER BY upper(A.Name), upper(A.Version)

I have recently upgraded to a derby  This same query no longer 
completes.  Instead, it seems the CPU usage of the process that runs the 
query shoots up to 50-80%, and never completes (i've left it for 
hours).  Any ideas why?

I am using the same exact database, the same java version, and my code 
hasn't changed.  Nothing in the query has changed.

I have the same problem on  I traced it back and found that 
even has this problem. 

I've been scratching my head on this one for two days, any help would be 
greatly appreciated!


View raw message