Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: NO ANALYZE STATS FOR TABLE
Thank gurus, Will take a sample rows.
-----Original Message-----
Sent: Tuesday, October 15, 2002 6:34 PM
To: Multiple recipients of list ORACLE-L
Moses - Ah, another clue. Yes, no results provided until the analyze
completes. Your problem isn't getting results, but getting the analyze to
complete. Analyze also sorts the data, so your TEMP file is probably
getting hit like crazy also. Kill that command. Try again with ANALYZE TABLE
A ESTIMATE STATISTICS.
There is no reason to analyze each and every row in an 8 million row
table. Just take a sample. Read the documentation on ANALYZE and decide what
type of sample is appropriate for your table. Personally, I favor analyze a
fixed number of rows, having studied statistics in the past. The best would
be to do a baseline analysis, note the statistics reported and how long it
took to complete. Then increase the estimate, note the new statistics and
the completion time. After a few tries, you'll notice the statistics aren't
changing much. You will decide the best cost/benefit tradeoff between number
of rows and the results obtained.
On a smaller table, you can perform this experiment in reverse, first doing a complete analysis, then comparing the results with varying sizes of estimates.
Also, depending on your Oracle version, check out DBMS_STATS. Oracle is now focusing its efforts on that package.
Dennis Williams
DBA
Lifetouch, Inc.
dwilliams_at_lifetouch.com
-----Original Message-----
Sent: Tuesday, October 15, 2002 9:49 AM
To: Multiple recipients of list ORACLE-L
I don't get any results when I run the query provided. I have done this but all I get are results for other tables otherthan table A. The analyze has gone on for 24 hours.
-----Original Message-----
Sent: Tuesday, October 15, 2002 4:39 PM
To: Multiple recipients of list ORACLE-L
Moses - What were you expecting? ANALYZE will produce nothing at the terminal, when it completes it just returns the cursor. Try this:
select last_analyzed from user_tables where table_name = 'A'; You should see the date that you performed the analysis. The main reason you analyze tables is to provide information for the CBO. Oh, and you don't need to turn on tracing or timed statistics.
Dennis Williams
DBA
Lifetouch, Inc.
dwilliams_at_lifetouch.com
-----Original Message-----
Sent: Tuesday, October 15, 2002 7:19 AM
To: Multiple recipients of list ORACLE-L
Hi gurus,
I have analyzed my table A but I get no stats for the table. What could be the problem? I set TIMED_STATISTICS = TRUE and SQL_TRACE=TRUE before issuing the ANALYZE TABLE A COMPUTE STATISTICS command.
This table has over 8 million records.
Moses Ngati
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: DENNIS WILLIAMS
INET: DWILLIAMS_at_LIFETOUCH.COM
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Oct 16 2002 - 01:38:25 CDT
![]() |
![]() |