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 > DB2 Reorg indexes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-11-06, 22:51
tychak tychak is offline
Registered User
 
Join Date: Sep 2006
Posts: 4
DB2 Reorg indexes

What's the free space requirement for reorg the indexes of the table using "db2 reorg indexes all for table xxx allow write access"?

Does it need free space in temporary tablespace or in the tablespace containing the indexes of the table?

My platform is AIX 5.2 + DB2 8 FP 10. Thanks.
Reply With Quote
  #2 (permalink)  
Old 09-12-06, 01:54
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Hi,
it depents is you are using SMS or DMS table space.
Grofaty
Reply With Quote
  #3 (permalink)  
Old 09-12-06, 10:49
jthakrar jthakrar is offline
Registered User
 
Join Date: Mar 2004
Posts: 46
I believe that index reorg will use the tablespace that contains the index(es).
Here's what I dug out from the DB2 Admin Performance Guide -

REORG INDEXES has the following requirements:
- SYSADM, SYSMAINT, SYSCTRL or DBADM authority, or CONTROL privilege on the indexes and table

- An amount of free space in the table space where the indexes are stored equal to the current size of the index

Consider placing indexes subject to reorganization in a large table space when you issue the CREATE TABLE statement.

- Additional log space REORG INDEXES logs its activity. As a result, the reorganization might fail, especially if the system is busy and other concurrent activity is logged.

Note: If a REORG INDEXES ALL with the ALLOW NO ACCESS option fails, the indexes are marked bad and the operation is not undone. However, if a REORG with the ALLOW READ ACCESS or a REORG with the ALLOW WRITE ACCESS option fails, the original index object is restored.

HTH

-- Jayesh
Reply With Quote
  #4 (permalink)  
Old 09-14-06, 04:58
tychak tychak is offline
Registered User
 
Join Date: Sep 2006
Posts: 4
It's DMS.

From administration guide, it states that it need free space in the tablespace where the indexes are stored.

However, I encounted the error which states another tablespace is full. That tablespace is a temporary tablespace I have created.
Reply With Quote
  #5 (permalink)  
Old 09-14-06, 10:16
jthakrar jthakrar is offline
Registered User
 
Join Date: Mar 2004
Posts: 46
I have a feeling that's because DB2 sorted all the index entries which was done in the temp tablespace. So to sum it, you need sufficient space in temp to sort the index entries and additional space in the index tablespace to accomodate the entire new index and the old index.
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