Home » SQL & PL/SQL » SQL & PL/SQL » Table partitioning
Table partitioning [message #376539] Wed, 17 December 2008 13:59 Go to next message
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;

SELECT table_name,
FROM user_tab_partitions
ORDER BY table_name, partition_name;
Re: Table partitioning [message #376542 is a reply to message #376539] Wed, 17 December 2008 14:04 Go to previous message
Michel Cadot
Messages: 64606
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
As for table, num_rows is filled when statistics are gathered.

Previous Topic: Views vs Materialized Views
Next Topic: NLS_LANG and ORA-00922
Goto Forum:

Current Time: Fri Mar 24 23:04:54 CDT 2017

Total time taken to generate the page: 0.09194 seconds