Scheduling SQL optimization tasks
You can create schedules for automatically exploring SQL queries to generate recommendations, for deploying recommendations, and for resolving access path regressions without manual intervention. By scheduling these tasks, you can reduce the amount of time that you need to interact manually with IBM® Z Database Assistant.
About this task
- This task applies to existing queries only. To evaluate and tune new queries, see Optimizing new SQL queries.
- This task covers all three types of schedules.
- Creating schedules is optional; you can manually do all of these tasks on the fly if you want to take action outside of the established schedule.
Procedure
Creating an exploration schedule
The process of generating recommendations for improving SQL performance is called SQL exploration. IBM Z Database Assistant can generate recommendations for improving access path performance, index performance, and for rewriting queries to run more efficiently.
About this task
There are several advantages to creating an exploration schedule:
- By creating an exploration schedule, you reduce the time associated with interacting with IBM Z Database Assistant through automating the tasks of selecting and exploring queries.
- A schedule enables explorations to be performed at a specified time, without the need for you to be logged in at that time.
- By spreading out explorations over time, you also spread out the overhead associated with them over time and potentially avoiding resource spikes that could come from exploring a large number of queries at once.
Creating an exploration schedule is optional, but recommended. If you choose not to create an exploration schedule, you must manually initiate explorations from the SQL tuning page. There is no default exploration schedule.
Procedure
To create an exploration schedule:
Creating a deployment schedule
You can choose to create a deployment schedule to specify when IBM Z Database Assistant will automatically implement the results of an exploration.
About this task
There are several advantages to creating deployment schedules:
- By creating a deployment schedule, you reduce the time associated with interacting with IBM Z Database Assistant to deploy the results of explorations.
- You can deploy recommendations at a specified time, without the need for you to be logged in at that time.
Creating a deployment schedule is optional, but recommended. If you choose not to create an deployment schedule, you must manually deploy recommendations from the SQL optimization page. There is no default deployment schedule.
Procedure
To create a deployment schedule:
Creating a regression resolution schedule
You can choose to resolve access path regressions either by creating a regression resolution schedule to specify when IBM Z Database Assistant will automatically resolve the access path regression or by manually resolving the access path regression through the IBM Z Database Assistant user interface.
About this task
IBM Z Database Assistant has a default regression resolution schedule, which resolves access path regressions every 5 minutes. If this schedule is acceptable, you do not need to make any changes. If changes to the default schedule are needed, use the procedure described below to modify the default schedule.
By creating a regression resolution schedule, you reduce the time associated with interacting with IBM Z Database Assistant through automating the tasks of selecting and resolving access path regressions, which can reduce the impact of the performance regression.
Procedure
To create or modify a regression resolution schedule: