Valentin Kulichenko commented on IGNITE-7167:

 # But we're going to disallow this eventually, right? For now, is it possible 
to track this somehow and use {{size()}} when possible? Having several types in 
a cache is very rare now, so doing scan in this case is OK.
 # Can you elaborate on this? What exactly doesn't work?

In general, if {{size()}} is not an appropriate solution, maybe there is 
another one? From my expirience with other DBs, this query never takes a lot of 
time even for large tables. And this seems to cause confusion for our users as 
well. Would be great if we come up with something here, even if not right now.

> 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
>            Priority: Major
> 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

Reply via email to