[
https://issues.apache.org/jira/browse/IGNITE-7167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vladimir Ozerov resolved IGNITE-7167.
-------------------------------------
Resolution: Duplicate
We already optimized this, see IGNITE-6702. We cannot get rid of scan in
general case. For now we iterate over index entries and count them. This is the
best what can be done.
However, when MVCC is ready, we will have to resort to (almost) original
approach - for every entry in the index we would have to check whether it is
visible.
> Optimize 'select count(*) from Table'
> -------------------------------------
>
> Key: IGNITE-7167
> URL: https://issues.apache.org/jira/browse/IGNITE-7167
> Project: Ignite
> Issue Type: Improvement
> Components: sql
> Affects Versions: 2.3
> Reporter: Valentin Kulichenko
>
> Currently query like {{select count(*) from Table}} effectively scans the
> cache and take a lot of time for large datasets. Probably makes sense to
> optimize it to use {{IgniteCache#size}} directly when possible.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)