Question:I want to create partitioned table:
My questions are:
- Should I make a partitioned index for primary key?
- It must be globally partitioned or local?
- It must be hash partitioned?
- How to know how many partitions must be for that index?
It should be something like this:
What is best practice with pk of partitoned table?
Answer:You can create UNIQUE (or PRIMARY KEY) index
LOCALhowever, then the partition key must be part of the index, i.e. you need to create a composite primary key:
An index like
audit_unq. So you don’t get any benefit, actually it combines the drawbacks of
If you have better answer, please add a comment about this, thank you!