View Single Post
  #1 (permalink)  
Old 12-16-02, 19:48
energie energie is offline
Registered User
 
Join Date: Dec 2002
Posts: 7
DBMS_STATS and Statistics question

Hi all.

I have a question regarding the statistics gathered after I called for example DBMS_STATS.GATHER_TABLE_STATS?

this is what I am trying to do:

I am trying to make use of the statistics Oracle uses to do its query estimation.
In SQL server, if they have a table with 100000 rows of records, the estimator might sample 5000 rows and store it in their system tables, and later on use this when they need to estimate a query.

I know ORACLE has this as well, but I've tried to look at what GATHER_TABLE_STATS, GET_TABLE_STATS etc will return. But I can't even see what they store.

Right now I am just testing with SQL PLUS, can someone give me a hint on how to view the "STATS" gathered after calling GATHER_TABLE_STATS?

this is my idea:

create a cursor and have that cursor point to the resultset that It generates ( I am hoping that it will generate some kind of resultset ).

I find it very hard to look for examples and samples on the DBMS_STATS package.
this is some of the stuff I've found so far:

http://download-west.oracle.com/docs...1g.htm#1004271

http://www.csis.gvsu.edu/GeneralInfo...ts.htm#1012305

I've looked at thse stuff for a very long time, but I still don't have a good grasp on it.

It would be great and very helpful if someone can point me to the right direction.

Thanks in advance!
Reply With Quote