Optimizer ODS 7.23
Posted in 1997
We have performance problems with the following statement (a.o.)
SELECT f.ind_glob_db_access, cf.dml_action
FROM functionx f, OUTER col_funcx cf
WHERE f.sys_nm = cf.sys_nm AND f.func_cd = cf.func_cd
AND f.sys_nm = "FAAIX" AND f.func_cd = "API_AFD_ST" AND cf.rt_nm ="AFDELING" and cf.col_nm IS NULL AND cf.dml_action = "I"
Unique indexes are on functionx(sys_nm, func_cd) and col_funcx(sys_nm,
rt_nm, col_nm, func_cd, dml_action)
Duplicate index is on col_funcx(sys_nm, func_cd)
Set explain gives an estimated cost of 2, using 2 index paths and a hash
join
If the OUTER is removed, set explain gives an estimated cost of 3, using
2 index paths
............
HOWEVER
............
The query without the OUTER is many times faster than the one with it.
Possible causes:
* the optimizer can't deal with OUTER joins
* the optimizer can't deal with NULL restrictions on an index column
System is ODS 7.23 on an NT server (2x PPro 200)
Anyone got a hint?
Thanx in advance
Frido
------------------------------------------------------------------------
Frido van Orden
FAA Partners BV
Planetenbaan 117
3606 AK Maarssen
The Netherlands
Phone: +31-346-587076
Fax: +31-346-587086
Email: fridoo@faapartners.com
------------------------------------------------------------------------
-