Results 1 to 3 of 3

Thread: Analyze table

  1. #1
    Join Date
    Jul 2003
    Posts
    32

    Unanswered: Analyze table

    How can i analyze all the tables in current schema in single shot?

  2. #2
    Join Date
    Jul 2003
    Location
    England
    Posts
    152
    execute dbms_stats.gather_schema_stats('USER');
    Regards
    Dbabren

  3. #3
    Join Date
    Jul 2003
    Posts
    2,296
    along those same lines:
    if you want to use ESTIMATE and also to analyze all indexes as well, then log in as the owner of that schema and:
    PHP Code:
    declare
    begin dbms_stats.gather_schema_stats(
             
    ownname          => user,
             
    options          => 'GATHER AUTO',
             
    estimate_percent => dbms_stats.auto_sample_size,
             
    method_opt       => 'FOR ALL INDEXED COLUMNS SIZE 1',
             
    cascade          => TRUE,
             
    degree           => 3
           
    );
    end;

    (I got this from asktom.com and it works great)
    - The_Duck
    you can lead someone to something but they will never learn anything ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •