• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

need information about DBMS_STATS.GATHER_TABLE_STATS ()

 
Ranch Hand
Posts: 258
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 258
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Got it. Many Thanks Martin.



Vijay
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic