Is there a way to see how much memory an in-memory SQLite database is consuming?
I played around with some Pragma Values, I put in a Select Statement. But the values don't seem right...
The page_count tells me the number of pages in the Database. The page_size value tells me the size of each page. I assume that I just have to multiply those values.
Where "db" is an SQLite database:
dim pCount, pSize as Integer dim rs as RecordSet rs = db.SQLSelect("PRAGMA page_count") if rs = nil then Return 0 pCount = rs.IdxField(1).IntegerValue rs.Close rs = db.SQLSelect("PRAGMA page_size") if rs = nil then Return 0 pSize = rs.IdxField(1).IntegerValue rs.Close Return pCount * pSize
But maybe there is another approach? Maybe there is a way to determine the memory footprint of the db property. As I said: db is a property of type SQLiteDatabase.