|
|
|
Re: DBMS_STATS for a Partitioned table [message #462386 is a reply to message #462229] |
Wed, 23 June 2010 21:21 |
hkchital
Messages: 128 Registered: September 2008 Location: Singapore
|
Senior Member |
|
|
UPDATE : See the EDIT below.
If you are TRUNCATing the table and reloading data every day and (I presume) not actually creating new partitions ........
any incremental statistics method wouldn't work.
However, you can *restore* statistics using DBMS_STATS.RESTORE_TABLE_STATS. Thus, you could restore the previous days statistics back. Of course, if you keep doing this every day, your statistics would become "stale", so you could do a Gather_Stats once a week or so.
Restore Table Statistics would work if
a. the data volumes are similar day-to-day
b. data skew is similar day-to-day
However, any columns that store date and sequence values that increment every day may need refreshing of statistics as actual values may soon be beyond the range of min/max stored in the statistics.
EDIT : If you are TRUNCATing the table do you check the statistics on the table after the truncate ? The HighWaterMark would be reset but statistics would still be usable so you wouldn't even have to re-Gather or restore statistics if data volume and data skew don't change significantly from one day to the next.
Hemant K Chitale
[Updated on: Wed, 23 June 2010 23:14] by Moderator Report message to a moderator
|
|
|