Table partitioning [message #376539] |
Wed, 17 December 2008 13:59 |
tutika_shilpa
Messages: 1 Registered: December 2008
|
Junior Member |
|
|
I have a table with millions of records.I need to partition the table.I did list partitioning based on column value but when query the table user_tab_partitions for partitons, then the num_rows column is null;
This is how I did.
My table is
1) Create a partitioned table:
create table partbl (qty number(3), name varchar2(15))
partition by range (name)
(partition p1 values('abc'),
partition p1 values('def'),
partition p1 values(DEFAULT));
2) Insert into the partitioned table with a subquery from the
non-partitioned table:
insert into partbl
select * from origtbl;
3) drop the original table and rename the
new table:
drop table origtbl;
alter table partbl rename to origtbl;
4)
SELECT table_name,
partition_name,
high_value,
num_rows
FROM user_tab_partitions
ORDER BY table_name, partition_name;
|
|
|
|