dbTalk Databases Forums  

CREATE INDEX.. COMPUTE STATT.. changes table stats

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss CREATE INDEX.. COMPUTE STATT.. changes table stats in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
maks
 
Posts: n/a

Default CREATE INDEX.. COMPUTE STATT.. changes table stats - 02-18-2005 , 04:56 PM






Hello,

I just observed that while creating index with "COMPUTE STATISTICS"
also collect the table/column (for the column in index) level
statistics.

Is this a normal behaviour?

Problem is , it does not create the histograms for the column which
eventually make CBO to choose in-correct execution plan...

Maks.


Reply With Quote
  #2  
Old   
Jonathan Lewis
 
Posts: n/a

Default Re: CREATE INDEX.. COMPUTE STATT.. changes table stats - 02-19-2005 , 11:14 AM







Depends on what you mean by "normal".

Yes, it happens in 8.1 and 9.2 - specifically,
it's only the histogram on the first column of
the index that is deleted, and the column stats
get updated.

This is (probably) a bug, and does not happen
in 10.1.0.3.


--
Regards

Jonathan Lewis

http://www.jlcomp.demon.co.uk/faq/ind_faq.html
The Co-operative Oracle Users' FAQ

http://www.jlcomp.demon.co.uk/seminar.html
Public Appearances - schedule updated Jan 21st 2005






"maks" <maks70 (AT) comcast (DOT) net> wrote

Quote:
Hello,

I just observed that while creating index with "COMPUTE STATISTICS"
also collect the table/column (for the column in index) level
statistics.

Is this a normal behaviour?

Problem is , it does not create the histograms for the column which
eventually make CBO to choose in-correct execution plan...

Maks.




Reply With Quote
  #3  
Old   
maks
 
Posts: n/a

Default Re: CREATE INDEX.. COMPUTE STATT.. changes table stats - 02-21-2005 , 04:30 PM



Thanks JL.

What I mean't to ask was if this behaviour was a bug or a feature.

Quote:
From your answer it looks like its possibly a bug and I will have to
remove 'compute statistics' clause while recreating indexes and then
collect stats on indexes separately.

Is there any other work around apart from this?



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.