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

Shawn Heisey commented on SOLR-11684:
-------------------------------------

I suspect that anyone who sees better performance when completely disabling the 
filterCache is someone who uses many unique filters and rarely has cache hits.  
Better performance probably results from one or more of three things:

 * no need to populate (or copy) a filter result into the cache.
 * no need to spend time evicting cache entries
 * they can have a smaller heap size and spend less time doing GC

Aside from the elapsed time available after the query has been executed, I 
don't know that there's any way for Solr to automatically detect that a given 
filter query is really cheap and decide on the fly not to cache it.  If elapsed 
time is a good metric to use, or there actually is another way to determine 
it's cheap, then this does sound like a good idea.

> Solr should not cache cheap filters
> -----------------------------------
>
>                 Key: SOLR-11684
>                 URL: https://issues.apache.org/jira/browse/SOLR-11684
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Varun Thacker
>
> In the past I've seen clients who disabled the filter cache saw better query 
> performance. 
> I've never got the chance to investigate this unfortuinately. 
> I was reading through 
> https://lucidworks.com/2017/11/27/caching-and-filters-and-post-filters/ today 
> and this section is something I wanted to revisit
> {code}
> cache=false – Tells Solr that we don't need/want this filter to be cached 
> independently for re-use.
>  This will allow Solr to evaluate these filters at the same time it's 
> processing the main query
> {code}
> Lucene does optimizations like LUCENE-7680 (I think there are more which I 
> can link later on). Maybe Solr should also consult 
> UsageTrackingQueryCachingPolicy and not cache certain cheap filters?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to