On 05.01.2012 18:01, Jeroen Reijn wrote:
Hi,

On Thu, Jan 5, 2012 at 3:17 PM, Yavuz Kavus<[email protected]>  wrote:

I am executing a query on a repository, to get all nodes of a specif type.
There is around 10.000 records of that type and query lasts for 25 seconds.

Sql is someting like this :
select id, userName, likesCount, talkingAboutCount
from pageProvider
order by likesCount asc

when i remove "order by clause", it comes down to 17 seconds.
isn't it too slow, though there is not where clause?

That depends. Are you trying to retrieve those 10.000 nodes as well?
In that case Jackrabbit will by default try to check the nodes with the
AccessManager if the nodes can be read.

Yes i am trying to retrieve 10.000 nodes. i think jackrabbit do paging when retrieving like
jdbc drivers do. Will Jackrabbit try to check accessibility for every node?
and besides, can i add an index for a field, like db index, not search
index
to fasten queries whose "where clause" includes that field?

not that I know of.

In my opinion jackrabbit should support indexes for orderable nodes
like databases. Something like this:

[nodeType] > superType
...
CreateIndexOn(indexableProp4, indexableProp5[, ...]) //multi-col index
...
-indexableProp1  ... CreateIndexOn
-prop2  ...
-indexableProp3 ... CreateIndexOn
-indexableProp4 ... //should not define CreateIndexOn
-indexableProp5 ...//should not define CreateIndexOn

and jackrabbit, should build an index for each property and as well a default index for identity.

Reply via email to