SQL Quarantine is only available on Exadata. In 19c, automatic quarantine generation and subsequent use are enabled by default.
In Oracle 21c, two new parameters have been introduced to control SQL Quarantine.
- OPTIMIZER_CAPTURE_SQL_QUARANTINE enables or disables the automatic creation of SQL Quarantine configurations. The default value is FALSE. If enabled, when the Resource Manager terminates a SQL statement because the statement has exceeded resource limits, the database automatically creates a SQL Quarantine configuration for the execution plan used by the terminated SQL statement.
- OPTIMIZER_USE_SQL_QUARANTINE determines whether the optimizer considers SQL Quarantine configurations when choosing an execution plan for a SQL statement. The default value is TRUE.
Thus, these parameters allow a system to use the SQL quarantine functionality but disable the automatic creation of quarantine configuration or restrict it to particular sessions.
This is a change in default behaviour, or at least a change to the original behaviour in 19c. Quarantine directives will not be generated by default, but if they exist, the optimiser will apply them.
The parameters can be backported to Oracle 19.3 or later by applying patch 30104721 (see Oracle Doc ID 2635030.1: 19c New Feature SQL Quarantine - How To Stop Automatic SQL Quarantine.
These parameters can both be set at system and session level.
If SQL quarantine configurations are not created, or set not to be used, or if you are not on Exadata, then SQLs will run to the CPU limit in the current consumer group before they are cancelled.
No comments :
Post a Comment