Home » RDBMS Server » Performance Tuning » How we can check count for each partition (Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit )
How we can check count for each partition [message #553224] Wed, 02 May 2012 10:23 Go to next message
msol25
Messages: 396
Registered: June 2011
Senior Member
Hi Experts,

We have 525 partitions and we want find out partition wise total count.Please help me for finding partitionwise count in a particular table.

Re: How we can check count for each partition [message #553226 is a reply to message #553224] Wed, 02 May 2012 10:29 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>We have 525 partitions and we want find out partition wise total count.Please help me for finding partitionwise count in a particular table.

count for which metric; rows, blocks, other?

query DBA_TAB_PARTITIONS
Re: How we can check count for each partition [message #553227 is a reply to message #553226] Wed, 02 May 2012 10:35 Go to previous messageGo to next message
msol25
Messages: 396
Registered: June 2011
Senior Member
yes but my table is not analyzed.So i think i cannot find exact count...

I want to find out total number of rows in eact partition using single sql select statement.
Re: How we can check count for each partition [message #553228 is a reply to message #553227] Wed, 02 May 2012 10:41 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>I want to find out total number of rows in eact partition using single sql select statement.
I want to win the lottery.
Sometime you don't get what you want.

Consider running DBMS_STATS against the table.
Re: How we can check count for each partition [message #553229 is a reply to message #553228] Wed, 02 May 2012 10:48 Go to previous messageGo to next message
msol25
Messages: 396
Registered: June 2011
Senior Member

My table is having 1995 million data and my Deployment is after 2 hrs then how i can win that lottery.
Re: How we can check count for each partition [message #553230 is a reply to message #553229] Wed, 02 May 2012 10:50 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>My table is having 1995 million data and my Deployment is after 2 hrs then how i can win that lottery.
The lack of planning on your part, does NOT constitute an emergency for me.
Re: How we can check count for each partition [message #553231 is a reply to message #553230] Wed, 02 May 2012 10:53 Go to previous messageGo to next message
msol25
Messages: 396
Registered: June 2011
Senior Member
Please anybody can resolve my issue........

I have a urgency.....

Re: How we can check count for each partition [message #553235 is a reply to message #553231] Wed, 02 May 2012 11:03 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Please anybody can resolve my issue........
>I have a urgency.....

How do you get rows counts without actually counting the rows?
Either you count then rows or DBMS_STATS count the rows.
pick your poison.
Re: How we can check count for each partition [message #553236 is a reply to message #553235] Wed, 02 May 2012 11:06 Go to previous messageGo to next message
msol25
Messages: 396
Registered: June 2011
Senior Member
i want to count the rows partitionwise....Please tell how i can do...?????????
Re: How we can check count for each partition [message #553241 is a reply to message #553236] Wed, 02 May 2012 11:22 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
  1* SELECT COUNT(*) FROM SALES partition (SALES_Q4_2003)
09:22:03 SQL> /

  COUNT(*)
----------
	 0

09:22:04 SQL> SELECT COUNT(*) FROM SALES partition (SALES_Q3_2003);

  COUNT(*)
----------
	 0

09:22:30 SQL> 

Re: How we can check count for each partition [message #553242 is a reply to message #553236] Wed, 02 May 2012 11:25 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
select count(*) from mytable partition (mypartition);
for each partition.

Regards
Michel
Re: How we can check count for each partition [message #553258 is a reply to message #553242] Wed, 02 May 2012 22:17 Go to previous messageGo to next message
msol25
Messages: 396
Registered: June 2011
Senior Member
Yes Michel,

I have done that only for checking my reqired partition details

Re: How we can check count for each partition [message #553259 is a reply to message #553258] Wed, 02 May 2012 22:22 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>I have done that only for checking my reqired partition details
Congratulations! Now you can take off the rest of the day.
Previous Topic: Achieve same execution plan
Next Topic: How we can find %age completion of query when is in running status
Goto Forum:
  


Current Time: Thu Mar 28 17:22:51 CDT 2024