DB2-z/OS: Bad performance in FAGL_GET_ITEMS_BSIS

[] [] [] []

Symptom
Wrong join order is used by DB2 to join table BSIS and FAGLFLEXA
in function module FAGL_GET_ITEMS_BSIS:

OPEN CURSOR WITH HOLD I_CURSOR FOR
select (lT_FLDLIST_S)
from (ld_dbtab_syntax) CLIENT SPECIFIED
where (lt_where_tab).

Reason and Prerequisites
Due to the REOPT(ONCE) feature of DB2 V8 the access path depends on the first set of values used. If this set is not typical a wrong access path might be determined and stored in the DB2 dynamic statement cache. This occurs in systems with data skew.
Solution
The attached modification instruction will enforce a full prepare of the SQL with each call so that DB2 can determine the optimal access path.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Leave a Comment