Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: how to influence the threshold for optimizer statistics to become stale
> I thought to calculate the percent for the table I wanted
> to have a different threshhold.
Thanks David to remember me that 4-5 years ago, with an Oracle8i DB, I also wrote something like that. My query also included truncated tables and tables without statistics.
CREATE OR REPLACE VIEW stale_statistics AS
SELECT DISTINCT table_name
FROM (
SELECT ut.table_name, -- tables modified via DML statements sum(ut.num_rows)/sum(utm.inserts+utm.updates+utm.deletes) valFROM user_tab_modifications utm, user_tables ut WHERE utm.table_name = ut.table_name
Cheers,
Chris
-- http://www.freelists.org/webpage/oracle-lReceived on Thu May 24 2007 - 00:07:28 CDT
![]() |
![]() |