If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > clustered index storage

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-05-08, 15:41
gautambali gautambali is offline
Registered User
 
Join Date: Sep 2008
Posts: 2
clustered index storage

Hi Friends,

I have a question regarding cluster index.If i already have a table with millions of records and then created a cluster index on that,suppose on a foreign key, how will the data be stored then.Do we need to reorg the table or its done automatically and if thats true and we do not go for reorg whether only new inserts will have indexing on it.


Thanx
Reply With Quote
  #2 (permalink)  
Old 09-05-08, 15:47
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
It will not be reorged automatically.

All rows will be in the index, regardless of whether you reorg the table. It is best if you do reorg the table (and then do runstats on table and indexes all) because DB2 does not like to use a clustered index that is not actually clustered (below about 90% clustered--I am not sure of the exact number).
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On