2xQ : index size
Posted in 2000
Topics: Storage & Space Management, Platform-Specific Issues
Hi all,
I have posted this question before, but I have no response, so I send it
again :
I have a table with a unique index on (col1 char(8),
col2 char(15),
col3 char(1))
and a primary key using this index.
I was expected to have a index size equal to 1+15+8+4+1=29, but when a
execute dbschema for this table a get a index size=42.
I have altered the fragment for the index and the table in the
correspendante dbspace, but the index size remane 42 with dbschema.
so please what am i missing here ??
I know that informix use the purcentage of null value in the index to
calculate the index size, but I don't know the exact formule
please help !!
I am using inforix 7.30 UC5 under AIX 4.3.2
In v7.3x, the following formula does match the output of dbschema. It also
appears to match the actual # of pages occupied by an index.
6 + trunc(1.5 * (sum(length of index cols))) -- unfragmented indexes.
I have no clue about why this has changed, nor of any supporting
documentation.
Rudy
P.S. If someone is privy to "inside" info, please educate us.
samir wrote:
> Hi all,
> I have posted this question before, but I have no response, so I send it
> again :
>
> I have a table with a unique index on (col1 char(8),
> col2 char(15),
> col3 char(1))
> and a primary key using this index.
> I was expected to have a index size equal to 1+15+8+4+1=29, but when a
> execute dbschema for this table a get a index size=42.
> I have altered the fragment for the index and the table in the
> correspendante dbspace, but the index size remane 42 with dbschema.
> so please what am i missing here ??
> I know that informix use the purcentage of null value in the index to
> calculate the index size, but I don't know the exact formule
> please help !!
> I am using inforix 7.30 UC5 under AIX 4.3.2
samir wrote:
>
> Hi all,
> I have posted this question before, but I have no response, so I send it
> again :
>
> I have a table with a unique index on (col1 char(8),
> col2 char(15),
> col3 char(1))
> and a primary key using this index.
> I was expected to have a index size equal to 1+15+8+4+1=29, but when a
> execute dbschema for this table a get a index size=42.
> I have altered the fragment for the index and the table in the
> correspendante dbspace, but the index size remane 42 with dbschema.
> so please what am i missing here ??
> I know that informix use the purcentage of null value in the index to
> calculate the index size, but I don't know the exact formule
> please help !!
> I am using inforix 7.30 UC5 under AIX 4.3.2
The index size calculation that dbschema uses allows for index overhead for
the root and other nodes above the leaves. The formula as implemented in my
myschema (dbschema replacement) utility is:
index size = (sum of key column lengths + 4) * 1.5
The '+ 4' is for the rowid needed for each row. For your table this
would become:
index size = (8 + 15 + 1 + 4) * 1.5 = 28 * 1.5 = 42
Note that dbschema and dbexport versions earlier than 7.31UC2 and 7.30UC4
contain a bug that fails to include the size of any DESCending column in
an index when calculating the size so the reported size is incorrect.
Art S. Kagel