Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: GATHER_SCHEMA_STATS

Re: GATHER_SCHEMA_STATS

From: Norman Dunbar <norman.dunbar_at_environment-agency.gov.uk>
Date: Tue, 11 Oct 2005 13:35:37 +0100
Message-Id: <s34bbfd1.030@environment-agency.gov.uk>

Morning Deepak,

in a previous contract we had a scheduled task (it was Windows 2000) to gather_schema_stats for a set of 5 different schemas on a 'regular' basis. This was run weekly whether it needed to or not. The app was third party and they specified that this had to be done or support would not be forthcoming.

It was noted that whenever an error occurred in one particular schema, the remainder of that schema was not 'analysed' and no stats were gathered. When I found this out, I rewrote the code to do individual gather_table_stats instead. It took a little longer, but when an exception was raised, I simply had one table with 'bad' stats rather then half a schema.

The exception was raised because there is a bug whereby the stats gathering process barfs if an index on a table has a combined key length of > 4000 (I think) characters. Our third party had built a multi-column index on two VARCHAR2(4000) columns plus a couple of others so that totally screwed the stats gathering.

I don't think they have got around to fixing said index yet, plus, it was never used in queries as far as I could gather :o)

Cheers,
Norman

--

If at first you don't succeed, sky diving probably isn't the sport for you.

Norman Dunbar.
Contract Oracle DBA.
Rivers House, Leeds.

Internal : 7 28 2051
External : 0113 231 2051

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.

We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.

We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.

If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk
--

http://www.freelists.org/webpage/oracle-l Received on Tue Oct 11 2005 - 07:38:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US