HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Estimating impact of indexes SQLite database size

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
impactestimatingsizesqliteindexesdatabase

Problem

I'm trying to estimate the database size (on disk) for a SQLite DB that includes a number of indexed columns. These columns are of (SQLite) type Integer and String. It's straightforward enough to estimate the size per row with these columns, but I'm not sure how to account for the extra per-row padding due to the indexes. What's the best approach for this?

Solution

At least some of the details of index B-trees are documented.

It might be easier to just create a test database, populate it, and measure the file size before and after creating an index.

Context

StackExchange Database Administrators Q#3393, answer score: 9

Revisions (0)

No revisions yet.