Re: Poor Oracle performance? getting rid of bind variables
Re: Poor Oracle performance? getting rid of bind variables
- Subject: Re: Poor Oracle performance? getting rid of bind variables
- From: Wiktor Moskwa <email@hidden>
- Date: Wed, 22 Aug 2007 15:49:12 +0200
Pascal Robert pisze:
> The reason ? The statistics on the prod server were 10 months old. As
> a example, a SELECT was taking 4 minutes with the old stats, after a
> refresh of the stats, the same query would take ... 500 ms. If you do
> an EXPLAIN on a SELECT and you see some CARTESIAN JOINT, check your
> table stats !
Hi,
Recent releases of Oracle database are trying to be able to self-manage.
Since 10g there is a batch job that updates statistics automatically
whenever a certain percent of data changes
But of course every database needs someone to take a look at it from
time to time.
Choosing CARTESIAN JOIN or FULL TABLE SCAN doesn't necessarly mean
that CBO is broken - sometimes it is the correct path.
> Now I just have to found where the PL/SQL package to update the stats
> don't actually update them...
DBMS_STATS.GATHER_TABLE_STATS has several options. Sometimes when it
seems that CBO is not doing what it's supposed to do and stats are
gathered, histograms on some columns could be ommitted.
Usually stats 'FOR ALL INDEXED COLUMNS' are enough but every case needs
a closer examination.
--
Wiktor Moskwa
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden