Julian Nesci
2008-03-04 02:21:31 UTC
Hi,
We're using DB2 UDB 8.2 FP 4 (8.1 FP 11) on Windows 2000 Servers.
I have a third party application whose code appends the OPTIMIZE FOR 1 ROW
clause to every SELECT statement it issues to DB2, via ODBC. This optimizer
hint is causing problems when trying to tune some queries because it is
occasionally forcing the use of non-optimal indexes. As it's a package I
don't have the luxury of removing the indexes I don't want (because it
affects the support licence) or altering the code.
I know the db2cli.ini file can be used to append the OPTIMIZE FOR x ROWS
clause to queries, although I've never done myself. I've not been able to
find it if it can also be used to override or remove an existing OPTIMIZE
FOR x ROWS clause which is already in the query?
Anyone know the answer to this?
Thanks in advance.
Cheers,
Julian.
We're using DB2 UDB 8.2 FP 4 (8.1 FP 11) on Windows 2000 Servers.
I have a third party application whose code appends the OPTIMIZE FOR 1 ROW
clause to every SELECT statement it issues to DB2, via ODBC. This optimizer
hint is causing problems when trying to tune some queries because it is
occasionally forcing the use of non-optimal indexes. As it's a package I
don't have the luxury of removing the indexes I don't want (because it
affects the support licence) or altering the code.
I know the db2cli.ini file can be used to append the OPTIMIZE FOR x ROWS
clause to queries, although I've never done myself. I've not been able to
find it if it can also be used to override or remove an existing OPTIMIZE
FOR x ROWS clause which is already in the query?
Anyone know the answer to this?
Thanks in advance.
Cheers,
Julian.