[ 
https://issues.apache.org/jira/browse/OAK-10102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17684452#comment-17684452
 ] 

Thomas Mueller commented on OAK-10102:
--------------------------------------

[~joerghoh] yes - I attached the original issue. In theory, it is an 
interesting feature: large indexes are only downloaded if queries might need 
it. We have enabled this for some time, and it did reduce the startup time. 

However, the effect was not all that big: indexes are also downloaded when 
doing cost evaluation. So that queries that _might_ be used for a query (but in 
fact are not) are still downloaded unnecessarily. It is much better to 

* remove unneeded indexes (e.g. don't use a "generic" fulltext index that 
indexes all data), and 
* shrink the indexes (e.g. avoid indexing properties that are not strictly 
needed), and
* for very large indexes, use Elastic instead of Lucene, and
* speed up index download by doing it in parallel instead of each file 
sequentially.

All those have a much bigger impact on startup time.

So since them, I didn't use this feature. And now, we found out (quite late) 
that query time is much worse if the feature is enabled.

Because of all that, I think it is better to disable the feature by default.

> Disable lazy index download by default
> --------------------------------------
>
>                 Key: OAK-10102
>                 URL: https://issues.apache.org/jira/browse/OAK-10102
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: lucene, query
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>            Priority: Major
>
> I found that with the default settings (the system property 
> "oak.lucene.nonLazyIndex" not set), and a decent number of Lucene indexes, 
> each query that might use a Lucene index takes around 30 ms. With the 
> property set, each query takes only 2 ms or so.
> The lazy index download was meant to speed up startup, because only indexes 
> are downloaded that are actually needed. But on my side, I have disabled the 
> setting since then.
> I think it makes sense to set change the default value, like it was before. 
> So enable the system property  "oak.lucene.nonLazyIndex" by default.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to