Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: 10g System statistics - single and multi
Martin,
I am not trying to say that the optmizer should be someting overly complex and totally unpredictable.
I just find that the logic Oracle uses for it's computation of the cost reduction ratio is somewhat flawed.
The reduction ratio is based on sequencial single reads vs. sequencial multiblock reads. As oposed to based on random single reads vs sequencial multi-block reads.
I also see a flaw in what I think should be the right logic, as the cost reduction ratio would be huge with the values of random single read.
For example:
on my test array, using iometer, 8K single read:
sequencial single read =3D 0.45 ms
random single read =3D 6.3 ms
32 mrbc (256k) sequencial multi =3D 2.2 ms
Cost reduction with current formula (sequencial single read) :
2.2 / 0.45 / 32 =3D ~0.15=20
Cost reduction with random single read
2.2 / 6.3 / 32 =3D ~0.01=20
So, not taking into account any caching, if you multiply the cost of plan with a FTS by sreadtim, you will have a some-what correct timing.
If you mutiply the cost of a plan with index range scan by sreatim, you may have a very incorect value or a very correct value, depending on the clustering factor and the "orderness" of the index itself. (again assuming no caching at any lvl)
I will try to make a test case for both these situation.
By using this formula (sequencial single read instaed of random single read), Oracle essentially increases the cost of FTS.
But when you throw caching into all this, if you are to use the random sinle read time, then the cost of index access will be over-priced by 5-10 ms per block cached in memory.
So by using the sequencial single read, Oracle kind-a accounts for caching in it's cost calculations and lowers costs for index access.
Does all this make any sense to you ?
Christo
On 5/20/05, Martic Zoran <zoran_martic_at_yahoo.com> wrote:
> Christo,
>=20
>=20
>=20
>=20
>=20
>=20
>=20
>=20 >=20> Do You Yahoo!?
> __________________________________________________
--=20
Christo Kutrovsky
Database/System Administrator
The Pythian Group
-- http://www.freelists.org/webpage/oracle-lReceived on Fri May 20 2005 - 17:11:27 CDT
![]() |
![]() |