Link to home
Start Free TrialLog in
Avatar of simonk_klammer
simonk_klammer

asked on

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.
Avatar of Acton Wang
Acton Wang
Flag of United States of America image

>>AUTO_SAMPLE_SIZE

    you might need to add somthing like:

    AUTO_SAMPLE_SIZE number;

    in your declaration area.
Avatar of geotiger
geotiger

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
   );
>>dbms_stats with estimate_percent=>dbms_stats.auto_sample_size
     my mistake. ignore my answer :)
ASKER CERTIFIED SOLUTION
Avatar of awking00
awking00
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of simonk_klammer

ASKER

To awking00:

My version is 8i.  Your response may explain why it doesn't seem to work.
Sorry :-(