Hi there,
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.
Does hsqldb work as designed in this case? I do not have much influence
on the sql statement since I am using Apache's Torque as db-layer.
Thanks for your help!
Patrick
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
|
|