Archives of the TeradataForum
Message Posted: Wed, 08 Dec 2004 @ 10:21:04 GMT
Subj: | | Re: Delete/drop partition in a PPI table |
|
From: | | Dieter Noeth |
Rakesh X Gandham wrote:
| Which is the best/faster way to delete/drop a partition in a PPI table. | |
Check the manuals how to add/drop partitions:
ALTER TABLE ...
MODIFY PRIMARY INDEX
DROP RANGE BETWEEN DATE '2004-01-01' AND DATE '2004-12-31'
EACH INTERVAL '1' YEAR
If there's no "Unknown" or "No Range" partition you can add WITH DELETE;
If there is, you'll have to delete that data before or the rows from 2004 will be moved to the "No Range" partition.
| I have to drop/delete partition and rebuild the partition. | |
"rebuild the partition"?
| I would really appreciate if anyone would help me in this regard. Normally each partition has about 300million rows. | |
As long as you delete/drop whole partitions it's similar to a "fast path delete" without where condition.
Dieter
|