oracle.oci.oci_database_management_sql_tuning_advisor_task_sql_execution_plan_facts – Fetches details about a SqlTuningAdvisorTaskSqlExecutionPlan resource in Oracle Cloud Infrastructure¶
Note
This plugin is part of the oracle.oci collection (version 5.0.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install oracle.oci
.
To use it in a playbook, specify: oracle.oci.oci_database_management_sql_tuning_advisor_task_sql_execution_plan_facts
.
New in version 2.9.0: of oracle.oci
Synopsis¶
Fetches details about a SqlTuningAdvisorTaskSqlExecutionPlan resource in Oracle Cloud Infrastructure
Retrieves a SQL execution plan for the SQL being tuned.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 3.6
Python SDK for Oracle Cloud Infrastructure https://oracle-cloud-infrastructure-python-sdk.readthedocs.io
Parameters¶
Parameter | Choices/Defaults | Comments |
---|---|---|
api_user
string
|
The OCID of the user, on whose behalf, OCI APIs are invoked. If not set, then the value of the OCI_USER_ID environment variable, if any, is used. This option is required if the user is not specified through a configuration file (See
config_file_location ). To get the user's OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm. |
|
api_user_fingerprint
string
|
Fingerprint for the key pair being used. If not set, then the value of the OCI_USER_FINGERPRINT environment variable, if any, is used. This option is required if the key fingerprint is not specified through a configuration file (See
config_file_location ). To get the key pair's fingerprint value please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm. |
|
api_user_key_file
string
|
Full path and filename of the private key (in PEM format). If not set, then the value of the OCI_USER_KEY_FILE variable, if any, is used. This option is required if the private key is not specified through a configuration file (See
config_file_location ). If the key is encrypted with a pass-phrase, the api_user_key_pass_phrase option must also be provided. |
|
api_user_key_pass_phrase
string
|
Passphrase used by the key referenced in
api_user_key_file , if it is encrypted. If not set, then the value of the OCI_USER_KEY_PASS_PHRASE variable, if any, is used. This option is required if the key passphrase is not specified through a configuration file (See config_file_location ). |
|
attribute
string
/ required
|
|
The attribute of the SQL execution plan.
|
auth_purpose
string
|
|
The auth purpose which can be used in conjunction with 'auth_type=instance_principal'. The default auth_purpose for instance_principal is None.
|
auth_type
string
|
|
The type of authentication to use for making API requests. By default
auth_type="api_key" based authentication is performed and the API key (see api_user_key_file) in your config file will be used. If this 'auth_type' module option is not specified, the value of the OCI_ANSIBLE_AUTH_TYPE, if any, is used. Use auth_type="instance_principal" to use instance principal based authentication when running ansible playbooks within an OCI compute instance. |
cert_bundle
string
|
The full path to a CA certificate bundle to be used for SSL verification. This will override the default CA certificate bundle. If not set, then the value of the OCI_ANSIBLE_CERT_BUNDLE variable, if any, is used.
|
|
config_file_location
string
|
Path to configuration file. If not set then the value of the OCI_CONFIG_FILE environment variable, if any, is used. Otherwise, defaults to ~/.oci/config.
|
|
config_profile_name
string
|
The profile to load from the config file referenced by
config_file_location . If not set, then the value of the OCI_CONFIG_PROFILE environment variable, if any, is used. Otherwise, defaults to the "DEFAULT" profile in config_file_location . |
|
managed_database_id
string
/ required
|
The OCID of the Managed Database.
|
|
realm_specific_endpoint_template_enabled
boolean
|
|
Enable/Disable realm specific endpoint template for service client. By Default, realm specific endpoint template is disabled. If not set, then the value of the OCI_REALM_SPECIFIC_SERVICE_ENDPOINT_TEMPLATE_ENABLED variable, if any, is used.
|
region
string
|
The Oracle Cloud Infrastructure region to use for all OCI API requests. If not set, then the value of the OCI_REGION variable, if any, is used. This option is required if the region is not specified through a configuration file (See
config_file_location ). Please refer to https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm for more information on OCI regions. |
|
sql_object_id
integer
/ required
|
The SQL object ID for the SQL tuning task. This is not the OCID.
|
|
sql_tuning_advisor_task_id
integer
/ required
|
The SQL tuning task identifier. This is not the OCID.
aliases: id |
|
tenancy
string
|
OCID of your tenancy. If not set, then the value of the OCI_TENANCY variable, if any, is used. This option is required if the tenancy OCID is not specified through a configuration file (See
config_file_location ). To get the tenancy OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm |
Notes¶
Note
For OCI python sdk configuration, please refer to https://oracle-cloud-infrastructure-python-sdk.readthedocs.io/en/latest/configuration.html
Examples¶
- name: Get a specific sql_tuning_advisor_task_sql_execution_plan
oci_database_management_sql_tuning_advisor_task_sql_execution_plan_facts:
# required
managed_database_id: "ocid1.manageddatabase.oc1..xxxxxxEXAMPLExxxxxx"
sql_tuning_advisor_task_id: 56
sql_object_id: 56
attribute: ORIGINAL
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description | ||
---|---|---|---|---|
sql_tuning_advisor_task_sql_execution_plan
complex
|
on success |
SqlTuningAdvisorTaskSqlExecutionPlan resource
Sample:
{'plan': [{'access_predicates': 'access_predicates_example', 'attribute': 'attribute_example', 'bytes': 56, 'cardinality': 56, 'cost': 1.2, 'cpu_cost': 1.2, 'filter_predicates': 'filter_predicates_example', 'io_cost': 1.2, 'number_of_search_column': 56, 'object_name': 'object_name_example', 'object_node': 'object_node_example', 'object_owner': 'object_owner_example', 'object_position': 56, 'object_type': 'object_type_example', 'operation': 'operation_example', 'optimizer_mode': 'optimizer_mode_example', 'options': 'options_example', 'other': 'other_example', 'other_tag': 'other_tag_example', 'parent_step_id': 56, 'partition_id': 56, 'partition_start': 'partition_start_example', 'partition_stop': 'partition_stop_example', 'plan_hash_value': 56, 'position': 56, 'remarks': 'remarks_example', 'step_id': 56, 'temp_space': 56, 'time': 56}]}
|
||
plan
complex
|
on success |
A SQL execution plan as a list of steps.
|
||
access_predicates
string
|
on success |
The predicates used to locate rows in an access structure. For example, start or stop predicates for an index range scan.
Sample:
access_predicates_example
|
||
attribute
string
|
on success |
The text string identifying the type of execution plan.
Sample:
attribute_example
|
||
bytes
integer
|
on success |
The number of bytes returned by the current operation.
Sample:
56
|
||
cardinality
integer
|
on success |
The number of rows returned by the current operation (estimated by the CBO).
Sample:
56
|
||
cost
float
|
on success |
The cost of the current operation estimated by the cost-based optimizer (CBO).
Sample:
1.2
|
||
cpu_cost
float
|
on success |
The CPU cost of the current operation.
Sample:
1.2
|
||
filter_predicates
string
|
on success |
The predicates used to filter rows before producing them.
Sample:
filter_predicates_example
|
||
io_cost
float
|
on success |
The I/O cost of the current operation.
Sample:
1.2
|
||
number_of_search_column
integer
|
on success |
Number of index columns with start and stop keys (that is, the number of columns with matching predicates).
Sample:
56
|
||
object_name
string
|
on success |
The name of the object.
Sample:
object_name_example
|
||
object_node
string
|
on success |
The name of the database link used to reference the object.
Sample:
object_node_example
|
||
object_owner
string
|
on success |
The owner of the object.
Sample:
object_owner_example
|
||
object_position
integer
|
on success |
The numbered position of the object name in the original SQL statement.
Sample:
56
|
||
object_type
string
|
on success |
The descriptive modifier that further describes the type of object.
Sample:
object_type_example
|
||
operation
string
|
on success |
The name of the operation performed at this step.
Sample:
operation_example
|
||
optimizer_mode
string
|
on success |
The current mode of the optimizer, such as all_rows, first_rows_n (where n = 1, 10, 100, 1000, and so on).
Sample:
optimizer_mode_example
|
||
options
string
|
on success |
The options used for the operation performed at this step.
Sample:
options_example
|
||
other
string
|
on success |
Information about parallel execution servers and parallel queries
Sample:
other_example
|
||
other_tag
string
|
on success |
Describes the function of the SQL text in the OTHER column.
Sample:
other_tag_example
|
||
parent_step_id
integer
|
on success |
The ID of the next step that operates on the results of this step. This is not the OCID.
Sample:
56
|
||
partition_id
integer
|
on success |
The ID of the step in the execution plan that has computed the pair of values of partitionStart and partitionStop.
Sample:
56
|
||
partition_start
string
|
on success |
A step may get data from a range of partitions of a partitioned object, such as table or index, based on predicates and sorting order. The partionStart is the starting partition of the range. The partitionStop is the ending partition of the range.
Sample:
partition_start_example
|
||
partition_stop
string
|
on success |
A step may get data from a range of partitions of a partitioned object, such as table or index, based on predicates and sorting order. The partionStart is the starting partition of the range. The partitionStop is the ending partition of the range.
Sample:
partition_stop_example
|
||
plan_hash_value
integer
|
on success |
The numerical representation of the SQL execution plan.
Sample:
56
|
||
position
integer
|
on success |
The order of processing for steps with the same parent ID.
Sample:
56
|
||
remarks
string
|
on success |
The place for comments that can be added to the steps of the execution plan.
Sample:
remarks_example
|
||
step_id
integer
|
on success |
The identification number of a step in the SQL execution plan. This is unique within the SQL execution plan. This is not the OCID.
Sample:
56
|
||
temp_space
integer
|
on success |
The temporary space usage (in bytes) of the operation (sort or hash-join) as estimated by the CBO.
Sample:
56
|
||
time
integer
|
on success |
The elapsed time (in seconds) of the operation as estimated by the CBO.
Sample:
56
|
Authors¶
Oracle (@oracle)