Cant we reduce the time taken by the “SELECT COUNT(1) FROM TABLE T1 WHERE...” with the below conditions….
- Query is scanning a partition (this is observed in the EXPLAIN PARTITIONS SELECT)
- Query is using the primary key
- Query is scanning 25 Mill rows.
Regards,
RAM
In Innodb, we cant improve the performance of SELECT COUNT(*) query.
The only alternative is to have counter tables and triggers or some other way of implementations to update these.
Regards,
UDAY