Archives of the TeradataForum
Message Posted: Mon, 17 Mar 2003 @ 20:04:47 GMT
Subj: | | Re: Primary index and table space |
|
From: | | John Hall |
Consider the situation where you have very good distribution of your data for the one-column PI - let's say 100 rows per AMP for a total
of 1,000 rows. Each AMP is responsible for some number of hash values. On each of those AMPs, the rows occupy some number of data blocks
with each block containing some number of rows.
When you re-indexed the table by making a multi-column PI, you caused the data to be redistributed by the new hash code. Instead of
being perfectly distributed with 100 rows per AMP, the new index has caused one AMP to receive an extra row. So the majority of your AMPs
have 100 rows per AMP and because of the new hash values, one AMP will have one less row and another AMP will have one additional row.
On the AMP that has one less row, there is a data block which has one less row. However, remember that each data block contains more
than one row and so by moving the one row, you still required a full data block to hold the remaining rows.
On the AMP that has the additional row, instead of the row fitting within an existing data block, an additional data block was used (the
additional space required in your question).
Sorry about the wording, but I couldn't find a better way of saying it.
|