DBStat returns wrong values for compressed databases
(1) By anonymous on 2021-02-25 17:40:43 [source]
When using dbstat on a database which has been compressed (tested with ZV-zstd and ZV-zlib) dbstat returns wrong values (e.g. unused is bigger than pgsize).
name | path | pageno | pagetype | ncell | payload | unused | mx_payload | pgoffset | pgsize |
---|---|---|---|---|---|---|---|---|---|
sqlite_master | / | 1 | leaf | 4 | 1041 | 64368 | 617 | 4946 | 487 |
table1 | / | 3 | leaf | 25 | 291 | 65137 | 22 | 1010 | 382 |
table2 | / | 4 | leaf | 1 | 2 | 65519 | 2 | 2001 | 36 |
table3 | / | 5 | leaf | 4 | 442 | 65074 | 111 | 4723 | 217 |
sqlite_stat1 | / | 6 | leaf | 3 | 92 | 65424 | 37 | 5482 | 115 |
(2) By Dan Kennedy (dan) on 2021-02-25 19:47:00 in reply to 1 [link] [source]
pgoffset and pgsize describe the compressed page as stored on disk. The other fields describe the uncompressed page in memory.
Dan.