Details
-
Suggestion
-
Resolution: Duplicate
Description
NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.
Regression & Mitigation: Measurements have shown that the query response time has drastically improved for most queries. However for those queries that have no filter restrictions („Full Table Scan Scenario“) the performance has decreased. Probably the current JIRA implementation is optimized for such a „Full Table Scan Scenario“. Good performance results have been achieved by a mixed approach.
Mixed Approach: For this mixed approach a read counter is introduced that counts the number of document read accesses. Additional an array pointer that can be assigned the field values of all Lucene index documents is used.
private long readCounter; private Object[] allValues; InternalFieldComparator2(int numHits, String fieldP, final LuceneFieldSorter sorter) { readCounter = 0; allValues = null; } /* For each read access to a Lucene document the counter is increased. If the counter is higher than 4000, a full table scan is assumed, and the old approach of retrieving all Lucene index documents is used. The old approach is faster if all documents have to be read anyway. */ public Object getValueFromDoc(int doc) { readCounter ++; if (readCounter > 4000) { if (allValues == null) { try { allValues = getLuceneValues(field, reader); } catch (IOException e) { allValues = new Object[reader.maxDoc()]; } } else ...
Attachments
Issue Links
- is related to
-
JRASERVER-27989 SAP Lucene Sorting Optimization - IndexReader
- Closed
- relates to
-
JRACLOUD-27990 SAP Lucene Sorting Optimization - readCounter for Full Table Scans
- Closed