Details
-
Bug
-
Status: Closed (View Workflow)
-
P2
-
Resolution: Done
-
30.2.3
-
CP: sprint 92
-
1
-
Core: Platform
-
Q2 2020
Description
limit=0 is used to get the totalRecords number without fetching records.
This is useless if estimated count is 8924 and actual count is 0, see MODORDERS-407 "Cannot create POL due to POL limit bug".
Solution: For limit=0 use SELECT count(*) ... without LIMIT to get the exact count.
Background: We have changed the totalRecords algorithm in RMB-591 "remove or harmonize 'optimizedSql' execution path" for performance reasons. However, RMB-645 'use where-only clause for the "count query"' removed the sortBy/order by clause from the count query reducing the execution time of the count query.
Other possible solutions:
- Always run SELECT count(*) ... LIMIT 1000 to get a precise hit count when the actual count is below 1000.
- Change factor 4 to 10, increasing 4000 to 10000.
- Run ANALYZE.
- Only change the hit count calculation when limit=0: If limit=0 run count-limit-1000.
TestRail: Results
Attachments
Issue Links
- blocks
-
MODORDSTOR-165 Cannot create POL due to POL limit bug
-
- Closed
-
-
UXPROD-3073 Display exact hit count from RMB
-
- Open
-
- relates to
-
RMB-579 In a GET request, control whether the server may estimate the hit count
-
- Closed
-
-
RMB-591 remove or harmonize 'optimizedSql' execution path
-
- Closed
-
-
RMB-578 Inform whether totalRecords is exact or an estimate
-
- Blocked
-
-
UXPROD-2369 Wait for POC of Elastic Search - Implement exact hit count (when using PostgreSql)
-
- Closed
-
- mentioned in
-
Page Loading...