> Can you give more details where those 3 seconds are spent? I'd be
> interested to
The query is in SQL:
SELECT Source FROM cm:document WHERE jcr:path LIKE '/cm:contentRoot/CCD/%'
AND cm:state='published' AND (flag3='2' OR flag3='1' ) AND
(Source='640' OR Source='240' OR Source='220' OR Source='130' OR
Source='160' OR Source='020' OR Source='630' OR Source='760' OR
Source='050' OR Source='730' OR Source='190' OR Source='230' OR
Source='360' OR Source='530' OR Source='040' OR Source='330' OR
Source='720' OR Source='750' OR Source='390' OR Source='540' OR
Source='280' OR Source='110' OR Source='580' OR Source='620' ) AND
(category1='090' OR Category1='150' OR Category1='130' OR Category1='160'
OR Category1='020' OR Category1='060' OR Category1='050' OR
Category1='140' OR Category1='040' OR Category1='010' OR Category1='080'
OR Category1='110' OR Category1='030' OR Category1='070' OR
Category1='100' OR Category1='120' ) ORDER BY Source
NodeType cm:document has properties "Source", "Category1" whose values equal
to other category nodes' values. (I can't use references because I need to
query on these multiple values to filter documents, which is not supported
in current JCR if node reference is used).
And here is the result (Extracted from the Log4j output):
- Query.execute(): 9375-7484 = 1891ms
- QueryResult.getRows(): less than 1 ms
- RowIterator.nextRow(): 13234-9375 = 3859ms
***********************************
[2006-12-01 10:32, 7484]DEBUG[WebContainer : 1] executing SQL query for
categories: SELECT Source FROM cm:document WHERE jcr:path LIKE
'/cm:contentRoot/CCD/%' AND cm:state='published' AND (flag3='2' OR
flag3='1' ) AND (Source='640' OR Source='240' OR Source='220' OR
Source='130' OR Source='160' OR Source='020' OR Source='630' OR
Source='760' OR Source='050' OR Source='730' OR Source='190' OR
Source='230' OR Source='360' OR Source='530' OR Source='040' OR
Source='330' OR Source='720' OR Source='750' OR Source='390' OR
Source='540' OR Source='280' OR Source='110' OR Source='580' OR
Source='620' ) AND (Category1='090' OR Category1='150' OR
Category1='130' OR Category1='160' OR Category1='020' OR Category1='060'
OR Category1='050' OR Category1='140' OR Category1='040' OR
Category1='010' OR Category1='080' OR Category1='110' OR Category1='030'
OR Category1='070' OR Category1='100' OR Category1='120' ) ORDER BY
Source
[2006-12-01 10:32, 9375]DEBUG[WebContainer : 1] query successful, getting
RowIterator
[2006-12-01 10:32, 9375]DEBUG[WebContainer : 1] got iterator, total number
of entries: 2092
[2006-12-01 10:32, 9375]DEBUG[WebContainer : 1] start parsing categories..
[2006-12-01 10:32, 13234]DEBUG[WebContainer : 1] end processing categories
************************************
Thanks,
Dan