Home » RDBMS Server » Performance Tuning » sample size in user_table
sample size in user_table [message #273816] Thu, 11 October 2007 15:05 Go to next message
navkrish
Messages: 189
Registered: May 2006
Location: NJ,USA
Senior Member

running below query
SELECT table_name, MONITORING, num_rows, sample_size,
       TO_CHAR (last_analyzed, 'DD/MM/YYYY HH24-mi-ss') analyzed
  FROM all_tables
 WHERE table_name = 'BUSINESS_NAME_BNM'



output in db 1:
BUSINESS_NAME_BNM     NO     27535125   5081100   08/10/2007 08-44-37

output in db 2:
BUSINESS_NAME_BNM     NO     28533200    0        11/10/2007 00-10-53


1) any reason why it could be?
2) what is the significant of sample_size?



Regards,
Naveen

[Updated on: Thu, 11 October 2007 15:06]

Report message to a moderator

Re: sample size in user_table [message #273818 is a reply to message #273816] Thu, 11 October 2007 15:27 Go to previous messageGo to next message
OracleDisected
Messages: 25
Registered: September 2007
Location: Mexico
Junior Member
When you have gathered statistcs with estimation instead of calculation. Estimation takes a percentage of blocks (sample size) in order to estimate rows for table.

Regards

[Edit MC: url to poster blog removed. We don't care about your blog in this post. If you have an answer on your site, post a link to this answer. If you don't, post your blog url in Marketplace]

[Updated on: Fri, 12 October 2007 00:01] by Moderator

Report message to a moderator

Re: sample size in user_table [message #273826 is a reply to message #273818] Thu, 11 October 2007 16:58 Go to previous messageGo to next message
navkrish
Messages: 189
Registered: May 2006
Location: NJ,USA
Senior Member

which one is better- gathered statistcs with estimation or calculation?
I'm an pl/sql developer and doesnt have much knowledge on DBA stuffs..
Re: sample size in user_table [message #273830 is a reply to message #273816] Thu, 11 October 2007 17:44 Go to previous message
BlackSwan
Messages: 25045
Registered: January 2009
Location: SoCal
Senior Member
which is better? good, fast or cheap???

compute is more accurate than estimate; but compute consumes more resources than estimate.

How close is "good enough"?
Previous Topic: View not using index on underlying tables
Next Topic: SGA and PGA
Goto Forum:
  


Current Time: Wed Dec 07 18:33:12 CST 2016

Total time taken to generate the page: 0.11969 seconds