You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Dmitry Pavlov (Jira)" <ji...@apache.org> on 2022/09/27 11:11:00 UTC
[jira] [Updated] (IGNITE-17250) Calcite. Make 'min()/max()' use first/last index value.
[ https://issues.apache.org/jira/browse/IGNITE-17250?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dmitry Pavlov updated IGNITE-17250:
-----------------------------------
Labels: ise (was: )
> Calcite. Make 'min()/max()' use first/last index value.
> -------------------------------------------------------
>
> Key: IGNITE-17250
> URL: https://issues.apache.org/jira/browse/IGNITE-17250
> Project: Ignite
> Issue Type: Improvement
> Reporter: Vladimir Steshin
> Assignee: Vladimir Steshin
> Priority: Major
> Labels: ise
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> Currently, Calcite's plan on min()/max() is the table scan and the aggregation n the indexed field:
> {code:sql}
> "select min(salary) from Person"
> {code}
> Plan:
> {code:java}
> IgniteReduceHashAggregate(group=[{}], MAX(SALARY)=[MAX($0)])
> IgniteExchange(distribution=[single])
> IgniteMapHashAggregate(group=[{}], MAX(SALARY)=[MAX($0)])
> IgniteTableScan(table=[[PUBLIC, PERSON]], requiredColumns=[{3}])
> {code}
> We could pick up first index record. No need to scan.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)