"Andre du Plessis" <[EMAIL PROTECTED]> wrote:
> I have a question on index size, I have a table that by doing some
> testing the DB have grown to 250MB, might not seem too large, as the
> table have 4million records in it. But for this DB this table would grow
> a lot larger than that. So I did some tests with a simple table 3 fields
> 
> FIELD1 is a integer with autogenerated primary key, the other two fields
> are integers, inserting 1 million records the DB ended up being around
> 12mb which seems to be correct, by adding indexes to the other 2 fields
> the db has grown to about 27mb, so my question is this.
> 

Each index entry contains both the integer being indexed and the
primary key of the original table.  That's 2/3rds of the information
in the original table.  So you would expect the index to be about
2/3rds the size of the original table.  That is about 8mb per index.
12 + 8 + 8 = 28.  So our back-of-the-envelop size computation agrees
very closely with what you observe in practice.

--
D. Richard Hipp <[EMAIL PROTECTED]>


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to