David Nuescheler wrote:
hi christoph,
I'm mostly using XPath, but SQL gives me better performance if I only
need a
particular property of a node in the result set.
can you elaborate on this? it would be great to have more background
information on this...
afaik, there should not be any difference in performance, and for example
"//element(*, nt:resource)/(@jcr:lastModified)" should be equivalent to
"select jcr:lastModified from nt:resource"
Hmm ;) My fault. I made two assumptions that proved to be wrong ;p
1. I was blindly assuming that I have to use a NodeIterator to iterate over an
XPath query result.
2. I assumed that RowIterator would only load the PropertyState of the
properties in the SQL query and not the associated NodeStates.
This led me to using SQL queries with RowIterator. Your astonishment made me
having a look at the implementation, where I found both assumptions to be wrong.
Just forget about the performance argument. And I will correct my answer to the
survey, since I only need to use XPath now ;)
Thanks & Cheers,
Christoph