Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-8027

Do not cache clauses if they might make the query more than X times slower

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Query caching can have a negative impact on tail latencies as the clause that is cached needs to be entirely consumed. Maybe we could leverage the fact that we can know the lead cost from any scorer now (LUCENE-7897) in order to implement heuristics that would look like "do not cache clause X if its cost is 10x greater than the cost of the entire query". This would make sure that a fast query can not become absurdly slow just because it had to cache a costly filter. The filter will need to wait for a more costly query to be cached, or might never be cached at all.

        Attachments

        1. LUCENE-8027.patch
          20 kB
          Adrien Grand

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jpountz Adrien Grand
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: