File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Oracle/OAS and the fly likes need information about DBMS_STATS.GATHER_TABLE_STATS () Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Reply Bookmark "need information about DBMS_STATS.GATHER_TABLE_STATS ()" Watch "need information about DBMS_STATS.GATHER_TABLE_STATS ()" New topic
Author

need information about DBMS_STATS.GATHER_TABLE_STATS ()

vijay jamadade
Ranch Hand

Joined: May 12, 2008
Posts: 224
I am using DBMS_STATS.GATHER_TABLE_STATS () function to analyze tables. Currently i am executing these once new data is loaded. I wanted to know when these user defined statistics expire? After how much time i need to run DBMS_STATS.GATHER_TABLE_STATS () command on my tables?


Thanks,
Vijay


Regards, Vijay Jamadade.
( Nothing is Impossible.)
Martin Vajsar
Bartender

Joined: Aug 22, 2010
Posts: 2331
    
    2

The statistics never expire. They may become stale (inaccurate) due to modifications that happen to the table after the statistics were gathered. So if your table doesn't ever change after loading data, you don't need to update its statistics at all. If it changes a lot, you may need to update statistics quite often.

There is an automatic mode for gathering statistics from Oracle 10g onward (or so), it gathers the stats when more than some fraction (10%, I believe) of table rows change.

I'd suggest reading Oracle documentation on statistics, you might start here (if you're not on 11g, find documentation for the version you're using).
vijay jamadade
Ranch Hand

Joined: May 12, 2008
Posts: 224
Got it. Many Thanks Martin.



Vijay
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: need information about DBMS_STATS.GATHER_TABLE_STATS ()
 
Similar Threads
Simple RDBMS question
Table Design using Absolure or Relative
Making a "deleteAll()" for an entity bean
Oracle merge same table
SQLGrammarException