Hi all,
We use DB2 9.7 @ Windows XP.
The table design:
It's an MDC Table with 2 dimensions (ORGANIZE BY DIMENSIONS (Country,Year)) and 10 further columns.
The table is marked as volatile.
Each record has an ID column - that is a
GUID (128 Bit value)
Each ID value will be generated from an external application.
The ID column is defined as CHAR(16) FOR BIT DATA - to save storage.
We want to use the ID column as PK.
Thus, we have the MDC indexes and the PK index.
Now, when we enter data into that table ….
Starting with an empty table:
Inserting of 100K until 600k rows in that table is very good - no problem in speed.
But from then, each INSERT of further new rows becomes slow.
When we reach 900k rows entered in the table: We have to wait 2x times during each new INSERT operation.
When we reach 1300k rows entered in the table: We have to wait 4x times during each new INSERT operation.
As more and more rows are entered - the waiting time becomes very high.
Our current approaches:
A) We drop the index and rebuild the index and start the bulk insert again.
Pro: It helps a bit - but in general the insert speed of the first 600k will not be achieved any more.
Con: We have to account the Drop/Rebuild time.
B) We drop the PK index, do the bulk insert and then rebuild the index.
Pro: The INSERT command is as fast as the first entered 600k rows – even when we have 2000k rows already in the table.

Con: We have to account the Drop/Rebuild time.
When the DB should go into production – is not very practical to drop/rebuild.
The following 2 queries are the main focus:
A) Select xyz from mdctable where Country = ? AND Year = ?
B) Select xyz from mdctable where ID = ?
Our thinking: The PK ID index on the GUID is not very easy to handle from DB2 – maybe much skewed distribution of the keys. We also tried to play with PCTFREE – but with results we cannot accept.
Maybe you have some good recommendations or hints.
Thank you.
Cheers,
2qwerty