If I have 2 partitions, named part1 and part2, can I create a local index for only part2, not part1?
When I look at the CREATE INDEX syntax, I don't see a place to specify a partition name.
thanks,
Printable View
If I have 2 partitions, named part1 and part2, can I create a local index for only part2, not part1?
When I look at the CREATE INDEX syntax, I don't see a place to specify a partition name.
thanks,
Maybe this will help you
Example :
CREATE INDEX invoices_idx ON invoices (invoice_date) LOCAL;
CREATE INDEX invoices_idx ON invoices (invoice_date) LOCAL
(PARTITION invoices_q1 TABLESPACE users,
PARTITION invoices_q2 TABLESPACE users,
PARTITION invoices_q3 TABLESPACE users,
PARTITION invoices_q4 TABLESPACE users);
The answer is: NO.
But if you are so desperate to have only rows in one of the partitions indexed (I can't find any reason why would one want to have such a thing)), then you should read about function-based indexes.