lib/oci/opsi/operations_insights_client.rb
# Query SQL Warehouse to get the performance insights on the execution plans for a given SQL for a given time period.
# @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
# @param [String] database_id Required [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database.
#
# @param [String] sql_identifier Unique SQL_ID for a SQL Statement.
#   Example: `6rgjh9bjmy2s7`
#
# @param [Hash] opts the optional parameters
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
#   retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
# @option opts [String] :analysis_time_interval Specify time period in ISO 8601 format with respect to current time.
#   Default is last 30 days represented by P30D.
#   If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored.
#   Examples  P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).
#    (default to P30D)
# @option opts [DateTime] :time_interval_start Analysis start time in UTC in ISO 8601 format(inclusive).
#   Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
#   The minimum allowed value is 2 years prior to the current day.
#   timeIntervalStart and timeIntervalEnd parameters are used together.
#   If analysisTimeInterval is specified, this parameter is ignored.
#
# @option opts [DateTime] :time_interval_end Analysis end time in UTC in ISO 8601 format(exclusive).
#   Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
#   timeIntervalStart and timeIntervalEnd are used together.
#   If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.
#
# @option opts [String] :page For list pagination. The value of the `opc-next-page` response header from
#   the previous \"List\" call. For important details about how pagination works,
#   see [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).
#
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
#   Oracle about a particular request, please provide the request ID.
#
# @return [Response] A Response object with data of type {OCI::Opsi::Models::SqlPlanInsightAggregationCollection SqlPlanInsightAggregationCollection}
# @note Click [here](https://docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/opsi/summarize_sql_plan_insights.rb.html) to see an example of how to use summarize_sql_plan_insights API.
Query SQL Warehouse to get the performance insights on the execution plans for a given SQL for a given time period.
Query SQL Warehouse to get the performance insights on the execution plans for a given SQL for a given time period .
def summarize_sql_plan_insights(compartment_id, database_id, sql_identifier, opts = {})
      logger.debug 'Calling operation OperationsInsightsClient#summarize_sql_plan_insights.' if logger
      raise "Missing the required parameter 'compartment_id' when calling summarize_sql_plan_insights." if compartment_id.nil?
      raise "Missing the required parameter 'database_id' when calling summarize_sql_plan_insights." if database_id.nil?
      raise "Missing the required parameter 'sql_identifier' when calling summarize_sql_plan_insights." if sql_identifier.nil?
      path = '/databaseInsights/sqlPlanInsights'
      operation_signing_strategy = :standard
      query_params = {}
      query_params[:compartmentId] = compartment_id
      query_params[:databaseId] = database_id
      query_params[:sqlIdentifier] = sql_identifier
      query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
      query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
      query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
      query_params[:page] = opts[:page] if opts[:page]
      header_params = {}
      header_params[:accept] = 'application/json'
      header_params[:'content-type'] = 'application/json'
      header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
      post_body = nil
      OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_sql_plan_insights') do
        @api_client.call_api(
          :GET,
          path,
          endpoint,
          header_params: header_params,
          query_params: query_params,
          operation_signing_strategy: operation_signing_strategy,
          body: post_body,
          return_type: 'OCI::Opsi::Models::SqlPlanInsightAggregationCollection'
        )
      end
    end
def summarize_sql_plan_insights ( compartment_id , database_id , sql_identifier , opts = { } ) logger . debug 'Calling operation OperationsInsightsClient#summarize_sql_plan_insights.' if logger raise "Missing the required parameter 'compartment_id' when calling summarize_sql_plan_insights." if compartment_id . nil? raise "Missing the required parameter 'database_id' when calling summarize_sql_plan_insights." if database_id . nil? raise "Missing the required parameter 'sql_identifier' when calling summarize_sql_plan_insights." if sql_identifier . nil? path = '/databaseInsights/sqlPlanInsights' operation_signing_strategy = :standard query_params = { } query_params [ :compartmentId ] = compartment_id query_params [ :databaseId ] = database_id query_params [ :sqlIdentifier ] = sql_identifier query_params [ :analysisTimeInterval ] = opts [ :analysis_time_interval ] if opts [ :analysis_time_interval ] query_params [ :timeIntervalStart ] = opts [ :time_interval_start ] if opts [ :time_interval_start ] query_params [ :timeIntervalEnd ] = opts [ :time_interval_end ] if opts [ :time_interval_end ] query_params [ :page ] = opts [ :page ] if opts [ :page ] header_params = { } header_params [ :accept ] = 'application/json' header_params [ :' content-type ' ] = 'application/json' header_params [ :' opc-request-id ' ] = opts [ :opc_request_id ] if opts [ :opc_request_id ] post_body = nil OCI :: Retry . make_retrying_call ( applicable_retry_config ( opts ) , call_name : 'OperationsInsightsClient#summarize_sql_plan_insights' ) do @api_client . call_api ( :GET , path , endpoint , header_params : header_params , query_params : query_params , operation_signing_strategy : operation_signing_strategy , body : post_body , return_type : 'OCI::Opsi::Models::SqlPlanInsightAggregationCollection' ) end end
Query SQL Warehouse to get the performance insights on the execution plans for a given SQL for a given time period.
Query SQL Warehouse to get the performance insights on the execution plans for a given SQL for a given time period .
# rubocop:disable Style/NegatedIf # Query Params # Header Params # rubocop:enable Style/NegatedIf # rubocop:disable Metrics/BlockLength # rubocop:enable Metrics/BlockLength
A Response object with data of type {OCI::Opsi::Models::SqlPlanInsightAggregationCollection SqlPlanInsightAggregationCollection}
A Response object with data of type { OCI :: Opsi :: Models :: SqlPlanInsightAggregationCollection SqlPlanInsightAggregationCollection }
Response
compartment_id
database_id
sql_identifier
opts
:opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
: opc_request_id Unique Oracle - assigned identifier for the request . If you need to contact Oracle about a particular request please provide the request ID .
opts the optional parameters
opts the optional parameters
note
Click [here] to see an example of how to use summarize_sql_plan_insights API.
Click [ here ] to see an example of how to use summarize_sql_plan_insights API .