我有一个包含许多表的SQLite数据库.我们正在编写一个维护工具,该工具将从表中删除"陈旧"数据,直到该表的大小达到或小于整个数据库文件的一定百分比.
我知道如何确定数据库文件的大小--我通过执行
PRAGMA PAGE_SIZE;
和
PRAGMA PAGE_COUNT;
in two separate queries 和 multiplying the two to get the file size in bytes. Yes, I know I can just take the size of the file in bytes, but this is similar to the way I've done it in other databases 和 I want to stick with it, at least for now.
我的问题是我不知道怎样才能算出桌子的大小.一定有办法做到这一点.有谁能给我指个方向吗?