DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Changing table statistics

  1. #1
    Join Date
    Sep 2005
    Posts
    46

    Changing table statistics

    Hai every body,
    I've a table with a five column PK. The table now has only 20 rows. But its supposed to grow to lakhs or records. In the where clause of a query on this table, i'll be specifying first 4 columns of the PK. Still its going for a full table scan instead of a range scan. May be with a lot of records .. it might go for an index rnage scan.

    My doubt is that .. are there any ways to set the table statistics. Means, can I alter the table statistics and say the table contains 10 lakh records.

    So that i can see how the query behaves with 10 lakh records.

    regards
    Issac

  2. #2
    Join Date
    Apr 2001
    Location
    Czechia
    Posts
    712
    Hi,
    yes, it is possible to change the statistics. In the dbms_stats package, there are the set_table_stats, set_index_stats and set column_stats procedures. You can play with them but I doubt you get anything useful. It's not only the number of rows that affect the optimizer, there is a lot of another parameters.

    The far best method is to populate the table with rows, compute statistics and then test the query.
    Ales
    The whole difference between a little boy and an adult man is the price of toys

  3. #3
    Join Date
    Sep 2005
    Posts
    46
    Thanks Ales,

    let me ponder over it...

    regards
    Issac

Posting Permissions

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


Click Here to Expand Forum to Full Width