Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Partition Record count

BurasamiSep 28 2012 — edited Sep 30 2012
Hi,

I have a table which was containing 2,68,86,632 rows. for performance issues i have partition the table using range partition using dbms_redefinition option

I have updated the table stats using
DBMS_STATS.GATHER_TABLE_STATS(USER, 'XXXXXXXXX', CASCADE => TRUE);

Once I completed the process successfully I have giving following SQL the check the row count
select /*+ NO_CPU_COSTING */  count(*) from XXXXXXXXX;

count(*)
--------
26886632
when am querying from user_tab_partition its giving different result from above SQL
SELECT table_name,sum(num_rows) FROM user_tab_partitions where partition_name like 'YYYYYYYY%'
group by table_name
ORDER BY table_name;

TABLE_NAME         SUM(NUM_ROWS)
-----------       ---------------
XXXXXXXXX	     26892488
SQL query from user_tab_partition shows me extra 5856 records then above SQL.

I don't known from where its comes.. Kindly help me trace the extra records where it comes from.

Thanks & Regards
Sami
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 28 2012
Added on Sep 28 2012
11 comments
3,462 views