Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Cost Based Optimizer
Hi Mladen
>Larry, according to what I know, the statement plan depends
>entirely on the statistics (with histograms, of course) and
>availability of usable indexes.
For some operations, like sorts and merge/hash joins, the cost also = depends on the "PGA size". I.e. for manual PGA management on = SORT_AREA_SIZE/HASH_AREA_SIZE. Here an example with a sort:
SQL> ALTER SESSION SET workarea_size_policy =3D manual;
SQL> ALTER SESSION SET sort_area_size =3D 1048576;
SQL> SELECT * FROM sales ORDER BY 1,2,3,4,5;
Execution Plan
SQL> ALTER SESSION SET sort_area_size =3D 131072;
SQL> SELECT * FROM sales ORDER BY 1,2,3,4,5;
Execution Plan
For automatic PGA management it's similar:
SQL> ALTER SESSION SET workarea_size_policy =3D auto;
SQL> ALTER SYSTEM SET pga_aggregate_target =3D 32M;
SQL> SELECT * FROM sales ORDER BY 1,2,3,4,5;
Execution Plan
SQL> ALTER SYSTEM SET pga_aggregate_target =3D 512M;
SQL> SELECT * FROM sales ORDER BY 1,2,3,4,5;
Execution Plan
Now, in case of automatic PGA management, it's not impossible that the = amount of allocated PGA has an impact on the costs. I'm not saying that = it does happen, in fact I never saw it... anyway this topic is on my "to = be tested" list.
HTH
Chris
-- http://www.freelists.org/webpage/oracle-lReceived on Fri May 20 2005 - 04:16:05 CDT
![]() |
![]() |