db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Carl <patrick.c...@coi.de>
Subject Performance problem
Date Thu, 21 Oct 2004 14:28:28 GMT
Hi there,

after tracing the sql generated I found out, that hslqdb behaves 
completely different depending on where the join-clause is.

The statement 
SELECT DISTINCT document.ID, document.ARCHIVE, document.ARCHIVEID, document.NAME, 
document.DOCCONFIGID FROM document, attribute 
WHERE UPPER(attribute.LANGUAGE)=UPPER('en') AND 
UPPER(attribute.VALUESEARCH) = UPPER('ABBIndustrie') AND
attribute.CONFIGID=17  AND 
document.ID=attribute.DOCID
takes 50 seconds.
The statement 
SELECT DISTINCT document.ID, document.ARCHIVE, document.ARCHIVEID, document.NAME, 
document.DOCCONFIGID FROM document, attribute 
WHERE document.ID=attribute.DOCID AND UPPER(attribute.VALUESEARCH) = UPPER('ABBIndustrie')

 AND UPPER(attribute.LANGUAGE) = UPPER('en') 
 and attribute.CONFIGID=17
takes muss less than one second.

The difference is that in the second one the join clause is at 
the beginning of the where clause.

Well, before pathing torque to change the order I will address myself
to the hsqldb-team,

Thanks for your help!

Patrick


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message