Hi,
I have come across a use case where I believe that ALTER TABLE schema.table ROTATE PARTITION FIRST TO LAST ENDING AT ( ...... ) RESET; can be handy, but all the technicalities around how the rotation works and affect different components are not clear, and knowledgecenter are really not informative enough regarding this.
In my tests is seems like you have to use RESET with the rotation and when you do, all rows in the rotated partition are
deleted, this can be quite a severe issue for a big table. From reading at knowledgecenter I get the feeling that RESET doesn't always do delete, but the formulation are vague and open for uncertainty, and during my tests it always seem to do delete. Is there a way to make the rotation to discard (or something similar to dummy load) instead?
If no, then the RESET functionality seem quite useless and you should discard or dummy load the partition before rotation instead.
I have tried
UTS PBR with 1 Index, UNIQUE, CLUSTER, PARTITIONED (on exactly the same row as the table)
UTS PBR with 1 Index, UNIQUE, CLUSTER
UTS PBR with 1 Index, Not-Unique, CLUSTER
UTS PBR with 2 Index, UNIQUE, CLUSTER and Not-UNIQUE, Not CLUSTER
Same results
Since the RESET writes to the log and I can use IBM Log Analysis Tool to generate UNDO (insert) statements, I guess it does deletes, but I'm not 100% sure. And even if it doesn't do delete, it's still quite bad to write so much to log compared to a reorg-discard.
Any thoughts?
Kind regards
Johan
------------------------------
Johan Sundborg, Swedbank AB
------------------------------