Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: tidb sql慢查询
Experts, there are over 1.8 billion rows of data in the TiDB table. Will counting (index field) result in a slow query?
Even if a field has an index, counting it still requires an index full scan (TiKV). The default threshold for slow queries is 300ms. If your hardware performance allows this count to return results within 300ms, it is not considered a slow query.
You can check the execution plan.
This topic was automatically closed 1 minute after the last reply. No new replies are allowed.