Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: MONITORING
Brian Tkatch wrote:
>
> When is an item considered stale, so that GATHER STALE collects
> recollects statistics?
>
> Also, I hacked this together:
>
> SELECT UT.Table_Name, UT.Num_Rows,
> UTM.Inserts, UTM.Updates, UTM.Deletes,
> ROUND((UTM.Inserts + UTM.Deletes) / DECODE(UT.Num_Rows, 0, 100,
> UT.Num_Rows) * 100, 2) || '%' "Percent Added/Deleted",
> ROUND((UTM.Inserts + UTM.Updates + UTM.Deletes) /
> DECODE(UT.Num_Rows, 0, 100, UT.Num_Rows) * 100, 2) || '%' "Percent
> Changed",
> UT.Last_Analyzed, UTM.Timestamp "Modification time"
> FROM User_Tables UT, User_Tab_Modifications UTM
> WHERE UT.Table_Name = UTM.Table_Name
> ORDER BY (UTM.Inserts + UTM.Updates + UTM.Deletes) /
> DECODE(UT.Num_Rows, 0, 100, UT.Num_Rows) DESC
>
> Does it make sense?
>
> Brian
I remember reading somehwere that gather_stale is based on 10% deltas, but please don't take that as gospel.
hth
connor
-- ============================== Connor McDonald http://www.oracledba.co.uk "Some days you're the pigeon, some days you're the statue..."Received on Thu Jan 24 2002 - 14:34:40 CST