Tanuj Khurana created PHOENIX-6899: -------------------------------------- Summary: Query limit not enforced in UncoveredIndexRegionScanner Key: PHOENIX-6899 URL: https://issues.apache.org/jira/browse/PHOENIX-6899 Project: Phoenix Issue Type: Improvement Affects Versions: 5.1.3, 5.2.0 Reporter: Tanuj Khurana Assignee: Tanuj Khurana
If the select query specifies a limit, the limit is available as a scan attribute BaseScannerRegionObserver.INDEX_LIMIT (https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/iterate/RegionScannerFactory.java#L154). However, that limit is not enforced on the page size used in the UncoveredIndexRegionScanner. It continues to use the page size based on the config *_phoenix.index.page_size_in_rows_* This results in doing extra work in reading the index rows and then joining them with the data table only to be thrown away. Set the page size to be the smaller of the configured size and the query limit if provided. Another thing I found was that the explain plan when the uncovered index is used doesn't list the plan step "*SERVER <> ROW LIMIT*" -- This message was sent by Atlassian Jira (v8.20.10#820010)