On 16.01.12 13:46, "Kevin Müller" <[email protected]> wrote: >"No, there will be one query. This acts against the lucene search index. >For each result (= row = node) based on the search index, the node be >loaded (= fetched from the persistence manager). >That last step can be done lazily - i.e. only a number X of results is >fetched at the beginning, the rest will be fetched when you iterate that >far through the results (see resultFetchSize [0])." > >The second step is what I was talking about, not the Lucene query but the >SQL query that fetches the actual data for each node (I'm using a >DatabasePersistenceManager). One separate query is executed for each >result node.
Ah, I see. jcr query vs. database pm query :-). Well, that's the architecture of Jackrabbit. Some notes: - make sure to use a BundleDbPersistenceManager [0] (DatabasePersistenceManager does not sound like you do) - they are highly recommended performance-wise, as I mentioned before. - Jackrabbit will cache node bundles (after they have been loaded from the PM). This can be configured [1] and might be more important than a bulk query - if the db has a good index, individually fetching the nodes might be fast already (but I don't know exactly) [0] http://wiki.apache.org/jackrabbit/PersistenceManagerFAQ [1] http://wiki.apache.org/jackrabbit/CacheManager HTH, Alex -- Alexander Klimetschek Developer // Adobe (Day) // Berlin - Basel
