dbms_stats with estimate_percent=>dbms_stats.auto_sample_size

Hello Experts:

Everytime I try to use this value for estimate_percent I get this error:

                     *
ERROR at line 1:
ORA-06550: line 1, column 102:
PLS-00302: component 'AUTO_SAMPLE_SIZE' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

What I am I doing wrong?  Do I need to initialize this variable?  How?  Why would I need to do it if Oracle is going to do it itself?

Thanks,

Simon.
simonk_klammerAsked:
Who is Participating?
 
awking00Connect With a Mentor Commented:
What version of Oracle? This feature was not made available until 9i.
0
 
actonwangCommented:
>>AUTO_SAMPLE_SIZE

    you might need to add somthing like:

    AUTO_SAMPLE_SIZE number;

    in your declaration area.
0
 
geotigerCommented:
You can always specify out the percentage such as in this one:

DBMS_STATS.gather_schema_stats (
      ownname            => 'HT4'
     ,estimate_percent   => 40
     ,block_sample       => FALSE
     ,method_opt         => 'FOR ALL INDEXED COLUMNS'
     ,degree             => NULL
     ,granularity        => 'DEFAULT'
     ,options            => 'GATHER'
     ,cascade            => TRUE
   );
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
actonwangCommented:
>>dbms_stats with estimate_percent=>dbms_stats.auto_sample_size
     my mistake. ignore my answer :)
0
 
simonk_klammerAuthor Commented:
To awking00:

My version is 8i.  Your response may explain why it doesn't seem to work.
0
 
awking00Commented:
Sorry :-(
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.