You can choose to independently start or stop the Db2ZAI SQL optimization function.
About this task
By starting or stopping the SQL optimization function, the IFCID 318 triggered by Db2ZAI for SQL optimization will be turned on or off.
Procedure
To start or stop the SQL optimization function:
-
Open a browser window and navigate to
https://<hostname>:<port>/, where
<hostname> is your Db2ZAI address and <port>
is the port you have assigned to Db2ZAI.
-
Sign in to Db2® AI for z/OS®.
- From the set of available connections, locate the one for which you want to start or stop the SQL optimization function and click the View connection actions menu (︙) to display the available actions, and click Settings.
- On the Main tab, click the SQL optimization button to start (if it is currently stopped) or stop (if it is currently started) the SQL optimization function for the connection.
The current state of the SQL optimization function (Started or Stopped) is indicated on the button.
Note:
Most of the benefits of Db2ZAI SQL optimization do not persist when Db2ZAI is stopped, and the longer Db2ZAI is stopped the more likely it is that those benefits will be lost.
One benefit that is persistent is that dynamic SQL that was automatically stabilized into SYSIBM.SYSDYNQRY using dynamic plan stability will remain stabilized no matter how long Db2ZAI is stopped.
The other benefits, however, are likely to go away over time. For example, because Db2ZAI is not collecting data when it is stopped, it cannot detect when an access path performance regression occurs. Therefore, there is no protection against an access path regression from occurring when Db2ZAI is stopped.
In addition, the Db2 optimizer cannot obtain information from Db2ZAI while Db2ZAI is stopped. This means the optimizer does not have access to the Db2ZAI models that were created, so the optimizer will not be able to use them when selecting the access path for the statement. This might lead to access paths reverting to their "pre-Db2ZAI" access paths during either REBIND (static SQL) or full prepare (dynamic SQL).