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 > ROTATE PARTITION issue

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-15-08, 08:52
umayer umayer is offline
Registered User
 
Join Date: Dec 2005
Posts: 273
ROTATE PARTITION issue

high all,

I currently perform some tests with the
ALTER TABLE ROTATE PARTITION FIRST TO LAST ... RESET
statement.

I created a table contolled partitioned table with a single partitioned not clustered index

issuing the ROTATE statement, I expected that DB2 simly drops and recreates the corresponding VSAM-clusters. But instead, each record is deleted one by one, causing a lot of getpage requests .

What can I do, that DB2 drops and recreates the VSAM-clusters instead of deleting each record separately ?
Reply With Quote
  #2 (permalink)  
Old 02-15-08, 10:18
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
The manual (for DB2 z/OS V9) says this:
Quote:
RESET
Specifies that the existing data in the oldest partition is deleted. In a partitioned table with limit values that are in ascending sequence, ALTER TABLE ALTER PARTITION ROTATE FIRST TO LAST logically operates as if the partition with the lowest high key limit were dropped and then a new partition was added with the specified high key limit. The new key limit for the partition must be higher than any other partition in the table. For descending limit keys, the rotation operates as the partition with the highest limit values becomes the partition with the lowest limit values.

If the partition contains referential integrity parent relationships, has DATA CAPTURE logging enabled, or has a delete row trigger, then each data row in the partition must be deleted individually. If a table does not have any of these attribute settings, then the data rows are removed by deleting and redefining the underlying data sets.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #3 (permalink)  
Old 02-15-08, 16:45
umayer umayer is offline
Registered User
 
Join Date: Dec 2005
Posts: 273
thanks for your reply, stolze. I've read the manual already.
None of that conditions is met.
- no RI
- no DATA CAPTURE
- no trigger
- no column with SECURITY

just a partitioned tablespace, a table, an partitioned noncluster index and nothing else ...
Reply With Quote
  #4 (permalink)  
Old 02-15-08, 18:12
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
I don't know which version of DB2 you are using - maybe your version has further restrictions? If not, you may want to contact IBM support because it means that either the manual is incorrect or that there is a bug in DB2.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #5 (permalink)  
Old 02-20-08, 02:31
umayer umayer is offline
Registered User
 
Join Date: Dec 2005
Posts: 273
we are using DB2 V8 NFM
Reply With Quote
  #6 (permalink)  
Old 05-04-09, 12:08
JSalt JSalt is offline
Registered User
 
Join Date: May 2009
Posts: 1
Same problem

Quote:
Originally Posted by umayer
we are using DB2 V8 NFM
I have the same problem in DB2 V8 NFM. The rotate is taking 3 hours to run. I am suspecting it is because the tablespace has TRACKMOD YES. Do you have TRACKMOD YES?
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