Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: fake stats to a particular partition
Syed
It's quite easy to do that. You could take one of the partition statistics as representative statistics and copy from the partition to other partitions. Here are the steps:
begin
FOR i in 251 .. 400 loop
INSERT INTO stats_on_apr07 (
STATID, TYPE , VERSION , FLAGS ,
C1 , C2 , C3, C4 , C5 ,
N1 , N2 , N3, N4 , N5 , N6, N7, N8, N9, n10,N11,N12,
D1 , R1 , R2 , CH1 )
select STATID, TYPE ,VERSION , FLAGS , C1 , 'PART_'||substr(c2,6,2)||'_'||lpad(i,3,'0') , C3, C4 , C5 , N1 , N2 , N3 , N4 ,N5, N6, N7, N8, N9,n10,N11,N12,
3. Import statistics.
Only problem here is that this not update the table level statistics, meaning if 1 million rows added to 251th partition, table level statistics does not reflect that. But, that is fine for us due to table size.
4. verify.
PS: Version:10gR1. Might need adjustments for different versions.
Syed Jaffar Hussain wrote:
> Hello List,
>
> Is there any way that we can set fake statistics to a particular
> partiton of a partitioned table?
> As I had asked a question sometime back that insert and other stuff
> are very slow on the first day of a new partition(monthly partitions).
> I would like to set fake statitics to a partition of a partition table.
>
> Thanks for your time.
>
> Jaffar
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If the reader of this message is not the intended recipient, you are hereby notified that your access is unauthorized, and any review, dissemination, distribution or copying of this message including any attachments is strictly prohibited. If you are not the intended recipient, please contact the sender and delete the material from any computer.
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Aug 10 2006 - 13:08:56 CDT
![]() |
![]() |