Removing rows from DBA_HISTOGRAMS [message #50188] |
Tue, 05 March 2002 07:57 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
meena
Messages: 36 Registered: December 2000
|
Member |
|
|
Hi,
How can I delete histogram statistics for a table from DBA_TAB_HISTOGRAMS and DBA_PART_HISTOGRAMS without removing statistics from any of the other dictionary tables. For instance DBMS_STATS.DELETE_TABLE_STATS can be used to delete all table statistics. Is there any package that can be used to delete just the histogram statistics?
Thanks,
Meena
|
|
|
Re: Removing rows from DBA_HISTOGRAMS [message #50191 is a reply to message #50188] |
Tue, 05 March 2002 09:29 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
andrew again
Messages: 2577 Registered: March 2000
|
Senior Member |
|
|
using the old analyze command, you could try something like:
analyze table XYZ delete statistics;
analyze table XYZ estimate statistics;
Using the long form of the command generates the histograms (in this case Tables and Indexes - I think);
analyze table XYZ estimate -- (or compute)
statistics for table for all indexes for all indexed columns;
|
|
|
Re: Removing rows from DBA_HISTOGRAMS [message #61239 is a reply to message #50188] |
Wed, 07 April 2004 01:49 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
Frank Naude
Messages: 4593 Registered: April 1998
|
Senior Member |
|
|
Hi,
One can use DBMS_STATS.DELETE_COLUMN_STATS to drop histograms from a table. Look at this example:
SQL> exec DBMS_STATS.DELETE_COLUMN_STATS ('SCOTT', 'EMP', 'EMPNO');
PL/SQL procedure successfully completed.
Best regards.
Frank
|
|
|