SQLite Forum

Approximate COUNT(*) using sqlite_stat4
Login
I'm sure there's some way of getting an approximate row count but I cannot remember what it is despite having spent the best part of an hour searching for a post I made on the very subject on the old nabble forum. I'm guessing it's something to do with the DBSTAT virtual table. Something to do with counting leafs and using a sample to approximate the average number of rows on a leaf.

Hopefully someone with a better memory will step in because I'd like to make use of it myself.

Edit: Not sure if this is related

https://sqlite.org/srcx/timeline?r=est_count_pragma&c=2016-12-16+15%3A57%3A40