SQLite: COUNT slow on big tables

前端 未结 8 2038
不知归路
不知归路 2021-02-02 07:43

I\'m having a performance problem in SQLite with a SELECT COUNT(*) on a large tables.

As I didn\'t yet receive a usable answer and I did some further testing, I edited m

8条回答
  •  一整个雨季
    2021-02-02 08:28

    This may not help much, but you can run the ANALYZE command to rebuild statistics about your database. Try running "ANALYZE;" to rebuild statistics about the entire database, then run your query again and see if it is any faster.

提交回复
热议问题