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

Thread: About ANALYZE table ....

  1. #1
    Join Date
    Jul 2000
    Posts
    6
    Hi all ,
    I ANALYZE some table for test and i query the table at the same time , but my query get a lot of time to retrivel data from database , the query run fast usually , i want to know that the ANALYZE either influrence the query or not ?
    thanx
    dannier

  2. #2
    Join Date
    Jul 2000
    Location
    Oxford, OH
    Posts
    117
    Danny,

    Yes, analyzing a table or index does affect the query. Probably was using an index before and is no longer because the CBO believes, wrongly, that the current access path is the quickest. You should try analyzing the table and table indexes (and use compute to be on the safe side for testing if they aren't too large). If the data in one of the columns accessed by the index is highly skewed, you'll need to compute histograms for those columns.

    Let me know if you need further clarification.

    (Delete the statistics first and run your query again and look at the explain plan, then reanalyze the table and indexes and run the query again. Compare the two differences and if you still need help, post the query and the plans from both runs)

    Joe
    _________________________
    Joe Ramsey
    Senior Database Administrator
    dbaDirect, Inc.
    (877)687-3227

  3. #3
    Join Date
    Apr 2000
    Location
    roma
    Posts
    131
    If you mean at the same time of analyzing that, is because the table lock (while analyzing the table is locked).

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