Push down limit on IndexLookUp
operator may improve performance in some scene
#10668
Labels
IndexLookUp
operator may improve performance in some scene
#10668
Performance Questions
3.0-rc2
Given a table like this:
and a query:
We can observe from the explain result that:
First, the value of the count column of
Limit_17
is misleading, it should not be 10.00.Actually, the
Limit_17
operator would scan 2000010 keys and return it toIndexLookUp_18
Then,
IndexLookUp_18
would get more than 2000010 index values to double read the table data, this process could be quite slow since it takes many network roundtrip.Finally the
Limit_9
would read fromIndexLookUp_18
and drop the first 2000000 records.There's room for improvement.
If we let the limit operator work on the aggregated index data, we can avoid reading 2000010 records in
TableScan_16
(and drop most of them).The text was updated successfully, but these errors were encountered: