oci.DatabaseManagement.getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison
Explore with Pulumi AI
This data source provides details about a specific Managed Database Sql Tuning Advisor Tasks Execution Plan Stats Comparision resource in Oracle Cloud Infrastructure Database Management service.
Retrieves a comparison of the existing SQL execution plan and a new plan. A SQL tuning task may suggest a new execution plan for a SQL, and this API retrieves the comparison report of the statistics of the two plans.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparision = oci.DatabaseManagement.getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison({
executionId: testExecution.id,
managedDatabaseId: testManagedDatabase.id,
sqlObjectId: testObject.id,
sqlTuningAdvisorTaskId: testSqlTuningAdvisorTask.id,
opcNamedCredentialId: managedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisionOpcNamedCredentialId,
});
import pulumi
import pulumi_oci as oci
test_managed_database_sql_tuning_advisor_tasks_execution_plan_stats_comparision = oci.DatabaseManagement.get_managed_database_sql_tuning_advisor_tasks_execution_plan_stats_comparison(execution_id=test_execution["id"],
managed_database_id=test_managed_database["id"],
sql_object_id=test_object["id"],
sql_tuning_advisor_task_id=test_sql_tuning_advisor_task["id"],
opc_named_credential_id=managed_database_sql_tuning_advisor_tasks_execution_plan_stats_comparision_opc_named_credential_id)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/go/oci/DatabaseManagement"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := DatabaseManagement.GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison(ctx, &databasemanagement.GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonArgs{
ExecutionId: testExecution.Id,
ManagedDatabaseId: testManagedDatabase.Id,
SqlObjectId: testObject.Id,
SqlTuningAdvisorTaskId: testSqlTuningAdvisorTask.Id,
OpcNamedCredentialId: pulumi.StringRef(managedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisionOpcNamedCredentialId),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparision = Oci.DatabaseManagement.GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison.Invoke(new()
{
ExecutionId = testExecution.Id,
ManagedDatabaseId = testManagedDatabase.Id,
SqlObjectId = testObject.Id,
SqlTuningAdvisorTaskId = testSqlTuningAdvisorTask.Id,
OpcNamedCredentialId = managedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisionOpcNamedCredentialId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.DatabaseManagement.DatabaseManagementFunctions;
import com.pulumi.oci.DatabaseManagement.inputs.GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var testManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparision = DatabaseManagementFunctions.getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison(GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonArgs.builder()
.executionId(testExecution.id())
.managedDatabaseId(testManagedDatabase.id())
.sqlObjectId(testObject.id())
.sqlTuningAdvisorTaskId(testSqlTuningAdvisorTask.id())
.opcNamedCredentialId(managedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisionOpcNamedCredentialId)
.build());
}
}
variables:
testManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparision:
fn::invoke:
Function: oci:DatabaseManagement:getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison
Arguments:
executionId: ${testExecution.id}
managedDatabaseId: ${testManagedDatabase.id}
sqlObjectId: ${testObject.id}
sqlTuningAdvisorTaskId: ${testSqlTuningAdvisorTask.id}
opcNamedCredentialId: ${managedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisionOpcNamedCredentialId}
Using getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison(args: GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonArgs, opts?: InvokeOptions): Promise<GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult>
function getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonOutput(args: GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonOutputArgs, opts?: InvokeOptions): Output<GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult>
def get_managed_database_sql_tuning_advisor_tasks_execution_plan_stats_comparison(execution_id: Optional[str] = None,
managed_database_id: Optional[str] = None,
opc_named_credential_id: Optional[str] = None,
sql_object_id: Optional[str] = None,
sql_tuning_advisor_task_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult
def get_managed_database_sql_tuning_advisor_tasks_execution_plan_stats_comparison_output(execution_id: Optional[pulumi.Input[str]] = None,
managed_database_id: Optional[pulumi.Input[str]] = None,
opc_named_credential_id: Optional[pulumi.Input[str]] = None,
sql_object_id: Optional[pulumi.Input[str]] = None,
sql_tuning_advisor_task_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult]
func GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison(ctx *Context, args *GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonArgs, opts ...InvokeOption) (*GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult, error)
func GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonOutput(ctx *Context, args *GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonOutputArgs, opts ...InvokeOption) GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResultOutput
> Note: This function is named GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison
in the Go SDK.
public static class GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison
{
public static Task<GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult> InvokeAsync(GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonArgs args, InvokeOptions? opts = null)
public static Output<GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult> Invoke(GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult> getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison(GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:DatabaseManagement/getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison:getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison
arguments:
# arguments dictionary
The following arguments are supported:
- Execution
Id string - The execution ID for an execution of a SQL tuning task. This is not the OCID.
- Managed
Database stringId - The OCID of the Managed Database.
- Sql
Object stringId - The SQL object ID for the SQL tuning task. This is not the OCID.
- Sql
Tuning stringAdvisor Task Id - The SQL tuning task identifier. This is not the OCID.
- Opc
Named stringCredential Id - The OCID of the Named Credential.
- Execution
Id string - The execution ID for an execution of a SQL tuning task. This is not the OCID.
- Managed
Database stringId - The OCID of the Managed Database.
- Sql
Object stringId - The SQL object ID for the SQL tuning task. This is not the OCID.
- Sql
Tuning stringAdvisor Task Id - The SQL tuning task identifier. This is not the OCID.
- Opc
Named stringCredential Id - The OCID of the Named Credential.
- execution
Id String - The execution ID for an execution of a SQL tuning task. This is not the OCID.
- managed
Database StringId - The OCID of the Managed Database.
- sql
Object StringId - The SQL object ID for the SQL tuning task. This is not the OCID.
- sql
Tuning StringAdvisor Task Id - The SQL tuning task identifier. This is not the OCID.
- opc
Named StringCredential Id - The OCID of the Named Credential.
- execution
Id string - The execution ID for an execution of a SQL tuning task. This is not the OCID.
- managed
Database stringId - The OCID of the Managed Database.
- sql
Object stringId - The SQL object ID for the SQL tuning task. This is not the OCID.
- sql
Tuning stringAdvisor Task Id - The SQL tuning task identifier. This is not the OCID.
- opc
Named stringCredential Id - The OCID of the Named Credential.
- execution_
id str - The execution ID for an execution of a SQL tuning task. This is not the OCID.
- managed_
database_ strid - The OCID of the Managed Database.
- sql_
object_ strid - The SQL object ID for the SQL tuning task. This is not the OCID.
- sql_
tuning_ stradvisor_ task_ id - The SQL tuning task identifier. This is not the OCID.
- opc_
named_ strcredential_ id - The OCID of the Named Credential.
- execution
Id String - The execution ID for an execution of a SQL tuning task. This is not the OCID.
- managed
Database StringId - The OCID of the Managed Database.
- sql
Object StringId - The SQL object ID for the SQL tuning task. This is not the OCID.
- sql
Tuning StringAdvisor Task Id - The SQL tuning task identifier. This is not the OCID.
- opc
Named StringCredential Id - The OCID of the Named Credential.
getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison Result
The following output properties are available:
- Execution
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Managed
Database stringId - Modifieds
List<Get
Managed Database Sql Tuning Advisor Tasks Execution Plan Stats Comparison Modified> - The statistics of a SQL execution plan.
- Originals
List<Get
Managed Database Sql Tuning Advisor Tasks Execution Plan Stats Comparison Original> - The statistics of a SQL execution plan.
- Sql
Object stringId - Sql
Tuning stringAdvisor Task Id - Opc
Named stringCredential Id
- Execution
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Managed
Database stringId - Modifieds
[]Get
Managed Database Sql Tuning Advisor Tasks Execution Plan Stats Comparison Modified - The statistics of a SQL execution plan.
- Originals
[]Get
Managed Database Sql Tuning Advisor Tasks Execution Plan Stats Comparison Original - The statistics of a SQL execution plan.
- Sql
Object stringId - Sql
Tuning stringAdvisor Task Id - Opc
Named stringCredential Id
- execution
Id String - id String
- The provider-assigned unique ID for this managed resource.
- managed
Database StringId - modifieds
List<Get
Managed Database Sql Tuning Advisor Tasks Execution Plan Stats Comparison Modified> - The statistics of a SQL execution plan.
- originals
List<Get
Managed Database Sql Tuning Advisor Tasks Execution Plan Stats Comparison Original> - The statistics of a SQL execution plan.
- sql
Object StringId - sql
Tuning StringAdvisor Task Id - opc
Named StringCredential Id
- execution
Id string - id string
- The provider-assigned unique ID for this managed resource.
- managed
Database stringId - modifieds
Get
Managed Database Sql Tuning Advisor Tasks Execution Plan Stats Comparison Modified[] - The statistics of a SQL execution plan.
- originals
Get
Managed Database Sql Tuning Advisor Tasks Execution Plan Stats Comparison Original[] - The statistics of a SQL execution plan.
- sql
Object stringId - sql
Tuning stringAdvisor Task Id - opc
Named stringCredential Id
- execution_
id str - id str
- The provider-assigned unique ID for this managed resource.
- managed_
database_ strid - modifieds
Sequence[databasemanagement.
Get Managed Database Sql Tuning Advisor Tasks Execution Plan Stats Comparison Modified] - The statistics of a SQL execution plan.
- originals
Sequence[databasemanagement.
Get Managed Database Sql Tuning Advisor Tasks Execution Plan Stats Comparison Original] - The statistics of a SQL execution plan.
- sql_
object_ strid - sql_
tuning_ stradvisor_ task_ id - opc_
named_ strcredential_ id
- execution
Id String - id String
- The provider-assigned unique ID for this managed resource.
- managed
Database StringId - modifieds List<Property Map>
- The statistics of a SQL execution plan.
- originals List<Property Map>
- The statistics of a SQL execution plan.
- sql
Object StringId - sql
Tuning StringAdvisor Task Id - opc
Named StringCredential Id
Supporting Types
GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonModified
- Plan
Stats Dictionary<string, object> - A map contains the statistics for the SQL execution using the plan. The key of the map is the metric's name. The value of the map is the metric's value.
- Plan
Status string - The status of the execution using the plan.
- Plan
Type string - The type of the original or modified plan with profile, index, and so on.
- Plan
Stats map[string]interface{} - A map contains the statistics for the SQL execution using the plan. The key of the map is the metric's name. The value of the map is the metric's value.
- Plan
Status string - The status of the execution using the plan.
- Plan
Type string - The type of the original or modified plan with profile, index, and so on.
- plan
Stats Map<String,Object> - A map contains the statistics for the SQL execution using the plan. The key of the map is the metric's name. The value of the map is the metric's value.
- plan
Status String - The status of the execution using the plan.
- plan
Type String - The type of the original or modified plan with profile, index, and so on.
- plan
Stats {[key: string]: any} - A map contains the statistics for the SQL execution using the plan. The key of the map is the metric's name. The value of the map is the metric's value.
- plan
Status string - The status of the execution using the plan.
- plan
Type string - The type of the original or modified plan with profile, index, and so on.
- plan_
stats Mapping[str, Any] - A map contains the statistics for the SQL execution using the plan. The key of the map is the metric's name. The value of the map is the metric's value.
- plan_
status str - The status of the execution using the plan.
- plan_
type str - The type of the original or modified plan with profile, index, and so on.
- plan
Stats Map<Any> - A map contains the statistics for the SQL execution using the plan. The key of the map is the metric's name. The value of the map is the metric's value.
- plan
Status String - The status of the execution using the plan.
- plan
Type String - The type of the original or modified plan with profile, index, and so on.
GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonOriginal
- Plan
Stats Dictionary<string, object> - A map contains the statistics for the SQL execution using the plan. The key of the map is the metric's name. The value of the map is the metric's value.
- Plan
Status string - The status of the execution using the plan.
- Plan
Type string - The type of the original or modified plan with profile, index, and so on.
- Plan
Stats map[string]interface{} - A map contains the statistics for the SQL execution using the plan. The key of the map is the metric's name. The value of the map is the metric's value.
- Plan
Status string - The status of the execution using the plan.
- Plan
Type string - The type of the original or modified plan with profile, index, and so on.
- plan
Stats Map<String,Object> - A map contains the statistics for the SQL execution using the plan. The key of the map is the metric's name. The value of the map is the metric's value.
- plan
Status String - The status of the execution using the plan.
- plan
Type String - The type of the original or modified plan with profile, index, and so on.
- plan
Stats {[key: string]: any} - A map contains the statistics for the SQL execution using the plan. The key of the map is the metric's name. The value of the map is the metric's value.
- plan
Status string - The status of the execution using the plan.
- plan
Type string - The type of the original or modified plan with profile, index, and so on.
- plan_
stats Mapping[str, Any] - A map contains the statistics for the SQL execution using the plan. The key of the map is the metric's name. The value of the map is the metric's value.
- plan_
status str - The status of the execution using the plan.
- plan_
type str - The type of the original or modified plan with profile, index, and so on.
- plan
Stats Map<Any> - A map contains the statistics for the SQL execution using the plan. The key of the map is the metric's name. The value of the map is the metric's value.
- plan
Status String - The status of the execution using the plan.
- plan
Type String - The type of the original or modified plan with profile, index, and so on.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.