Olaf Stein wrote:
> Because your int field always uses 4 bytes per record
> The varchar uses length + 1 bytes
i know... still i'm confused.
the average length of the refurl varchar is 12 character,
which means each row uses 12 + 3 bytes
which is about 3 times the integer would use.
i've create two tables with only the refurl columns:
refurl varchar: Data 29,326.1 KiB
Index 4,084.0 KiB
refurl integer: Data 9,972.3 KiB
Index 17,933.0 KiB
so the data size is what i would expect.
but i'm really surprised about the index size.
for me it seems so it depends on how you combine columns and indexes.
well i think i've to analyze a few tables because i always thought:
integer < varchar :) (if avg string length > 4)