1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getDbbrainSlowLogTopSqls
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.getDbbrainSlowLogTopSqls

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Use this data source to query detailed information of dbbrain slow_log_top_sqls

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const test = tencentcloud.getDbbrainSlowLogTopSqls({
        endTime: "%s",
        instanceId: "%s",
        orderBy: "ASC",
        product: "mysql",
        sortBy: "QueryTimeMax",
        startTime: "%s",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    test = tencentcloud.get_dbbrain_slow_log_top_sqls(end_time="%s",
        instance_id="%s",
        order_by="ASC",
        product="mysql",
        sort_by="QueryTimeMax",
        start_time="%s")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.GetDbbrainSlowLogTopSqls(ctx, &tencentcloud.GetDbbrainSlowLogTopSqlsArgs{
    			EndTime:    "%s",
    			InstanceId: "%s",
    			OrderBy:    pulumi.StringRef("ASC"),
    			Product:    pulumi.StringRef("mysql"),
    			SortBy:     pulumi.StringRef("QueryTimeMax"),
    			StartTime:  "%s",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var test = Tencentcloud.GetDbbrainSlowLogTopSqls.Invoke(new()
        {
            EndTime = "%s",
            InstanceId = "%s",
            OrderBy = "ASC",
            Product = "mysql",
            SortBy = "QueryTimeMax",
            StartTime = "%s",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetDbbrainSlowLogTopSqlsArgs;
    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 test = TencentcloudFunctions.getDbbrainSlowLogTopSqls(GetDbbrainSlowLogTopSqlsArgs.builder()
                .endTime("%s")
                .instanceId("%s")
                .orderBy("ASC")
                .product("mysql")
                .sortBy("QueryTimeMax")
                .startTime("%s")
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          function: tencentcloud:getDbbrainSlowLogTopSqls
          arguments:
            endTime: '%s'
            instanceId: '%s'
            orderBy: ASC
            product: mysql
            sortBy: QueryTimeMax
            startTime: '%s'
    

    Using getDbbrainSlowLogTopSqls

    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 getDbbrainSlowLogTopSqls(args: GetDbbrainSlowLogTopSqlsArgs, opts?: InvokeOptions): Promise<GetDbbrainSlowLogTopSqlsResult>
    function getDbbrainSlowLogTopSqlsOutput(args: GetDbbrainSlowLogTopSqlsOutputArgs, opts?: InvokeOptions): Output<GetDbbrainSlowLogTopSqlsResult>
    def get_dbbrain_slow_log_top_sqls(end_time: Optional[str] = None,
                                      id: Optional[str] = None,
                                      instance_id: Optional[str] = None,
                                      order_by: Optional[str] = None,
                                      product: Optional[str] = None,
                                      result_output_file: Optional[str] = None,
                                      schema_lists: Optional[Sequence[GetDbbrainSlowLogTopSqlsSchemaList]] = None,
                                      sort_by: Optional[str] = None,
                                      start_time: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetDbbrainSlowLogTopSqlsResult
    def get_dbbrain_slow_log_top_sqls_output(end_time: Optional[pulumi.Input[str]] = None,
                                      id: Optional[pulumi.Input[str]] = None,
                                      instance_id: Optional[pulumi.Input[str]] = None,
                                      order_by: Optional[pulumi.Input[str]] = None,
                                      product: Optional[pulumi.Input[str]] = None,
                                      result_output_file: Optional[pulumi.Input[str]] = None,
                                      schema_lists: Optional[pulumi.Input[Sequence[pulumi.Input[GetDbbrainSlowLogTopSqlsSchemaListArgs]]]] = None,
                                      sort_by: Optional[pulumi.Input[str]] = None,
                                      start_time: Optional[pulumi.Input[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetDbbrainSlowLogTopSqlsResult]
    func GetDbbrainSlowLogTopSqls(ctx *Context, args *GetDbbrainSlowLogTopSqlsArgs, opts ...InvokeOption) (*GetDbbrainSlowLogTopSqlsResult, error)
    func GetDbbrainSlowLogTopSqlsOutput(ctx *Context, args *GetDbbrainSlowLogTopSqlsOutputArgs, opts ...InvokeOption) GetDbbrainSlowLogTopSqlsResultOutput

    > Note: This function is named GetDbbrainSlowLogTopSqls in the Go SDK.

    public static class GetDbbrainSlowLogTopSqls 
    {
        public static Task<GetDbbrainSlowLogTopSqlsResult> InvokeAsync(GetDbbrainSlowLogTopSqlsArgs args, InvokeOptions? opts = null)
        public static Output<GetDbbrainSlowLogTopSqlsResult> Invoke(GetDbbrainSlowLogTopSqlsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDbbrainSlowLogTopSqlsResult> getDbbrainSlowLogTopSqls(GetDbbrainSlowLogTopSqlsArgs args, InvokeOptions options)
    public static Output<GetDbbrainSlowLogTopSqlsResult> getDbbrainSlowLogTopSqls(GetDbbrainSlowLogTopSqlsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getDbbrainSlowLogTopSqls:getDbbrainSlowLogTopSqls
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EndTime string
    The deadline, such as 2019-09-11 10:13:14, the interval between the deadline and the start time is less than 7 days.
    InstanceId string
    instance id.
    StartTime string
    Start time, such as 2019-09-10 12:13:14.
    Id string
    OrderBy string
    The sorting method supports ASC (ascending) and DESC (descending). The default is DESC.
    Product string
    Service product type, supported values include: mysql - cloud database MySQL, cynosdb - cloud database CynosDB for MySQL, the default is mysql.
    ResultOutputFile string
    Used to save results.
    SchemaLists List<GetDbbrainSlowLogTopSqlsSchemaList>
    Array of database names.
    SortBy string
    Sort key, currently supports sort keys such as QueryTime, ExecTimes, RowsSent, LockTime and RowsExamined, the default is QueryTime.
    EndTime string
    The deadline, such as 2019-09-11 10:13:14, the interval between the deadline and the start time is less than 7 days.
    InstanceId string
    instance id.
    StartTime string
    Start time, such as 2019-09-10 12:13:14.
    Id string
    OrderBy string
    The sorting method supports ASC (ascending) and DESC (descending). The default is DESC.
    Product string
    Service product type, supported values include: mysql - cloud database MySQL, cynosdb - cloud database CynosDB for MySQL, the default is mysql.
    ResultOutputFile string
    Used to save results.
    SchemaLists []GetDbbrainSlowLogTopSqlsSchemaList
    Array of database names.
    SortBy string
    Sort key, currently supports sort keys such as QueryTime, ExecTimes, RowsSent, LockTime and RowsExamined, the default is QueryTime.
    endTime String
    The deadline, such as 2019-09-11 10:13:14, the interval between the deadline and the start time is less than 7 days.
    instanceId String
    instance id.
    startTime String
    Start time, such as 2019-09-10 12:13:14.
    id String
    orderBy String
    The sorting method supports ASC (ascending) and DESC (descending). The default is DESC.
    product String
    Service product type, supported values include: mysql - cloud database MySQL, cynosdb - cloud database CynosDB for MySQL, the default is mysql.
    resultOutputFile String
    Used to save results.
    schemaLists List<GetDbbrainSlowLogTopSqlsSchemaList>
    Array of database names.
    sortBy String
    Sort key, currently supports sort keys such as QueryTime, ExecTimes, RowsSent, LockTime and RowsExamined, the default is QueryTime.
    endTime string
    The deadline, such as 2019-09-11 10:13:14, the interval between the deadline and the start time is less than 7 days.
    instanceId string
    instance id.
    startTime string
    Start time, such as 2019-09-10 12:13:14.
    id string
    orderBy string
    The sorting method supports ASC (ascending) and DESC (descending). The default is DESC.
    product string
    Service product type, supported values include: mysql - cloud database MySQL, cynosdb - cloud database CynosDB for MySQL, the default is mysql.
    resultOutputFile string
    Used to save results.
    schemaLists GetDbbrainSlowLogTopSqlsSchemaList[]
    Array of database names.
    sortBy string
    Sort key, currently supports sort keys such as QueryTime, ExecTimes, RowsSent, LockTime and RowsExamined, the default is QueryTime.
    end_time str
    The deadline, such as 2019-09-11 10:13:14, the interval between the deadline and the start time is less than 7 days.
    instance_id str
    instance id.
    start_time str
    Start time, such as 2019-09-10 12:13:14.
    id str
    order_by str
    The sorting method supports ASC (ascending) and DESC (descending). The default is DESC.
    product str
    Service product type, supported values include: mysql - cloud database MySQL, cynosdb - cloud database CynosDB for MySQL, the default is mysql.
    result_output_file str
    Used to save results.
    schema_lists Sequence[GetDbbrainSlowLogTopSqlsSchemaList]
    Array of database names.
    sort_by str
    Sort key, currently supports sort keys such as QueryTime, ExecTimes, RowsSent, LockTime and RowsExamined, the default is QueryTime.
    endTime String
    The deadline, such as 2019-09-11 10:13:14, the interval between the deadline and the start time is less than 7 days.
    instanceId String
    instance id.
    startTime String
    Start time, such as 2019-09-10 12:13:14.
    id String
    orderBy String
    The sorting method supports ASC (ascending) and DESC (descending). The default is DESC.
    product String
    Service product type, supported values include: mysql - cloud database MySQL, cynosdb - cloud database CynosDB for MySQL, the default is mysql.
    resultOutputFile String
    Used to save results.
    schemaLists List<Property Map>
    Array of database names.
    sortBy String
    Sort key, currently supports sort keys such as QueryTime, ExecTimes, RowsSent, LockTime and RowsExamined, the default is QueryTime.

    getDbbrainSlowLogTopSqls Result

    The following output properties are available:

    endTime String
    id String
    instanceId String
    rows List<Property Map>
    Slow log top sql list.
    startTime String
    orderBy String
    product String
    resultOutputFile String
    schemaLists List<Property Map>
    sortBy String

    Supporting Types

    GetDbbrainSlowLogTopSqlsRow

    ExecTimes double
    Execution times.
    LockTime double
    SQL total lock waiting time, in seconds.
    LockTimeAvg double
    Average lock waiting time, in seconds.
    LockTimeMax double
    Maximum lock waiting time, in seconds.
    LockTimeMin double
    Minimum lock waiting time, in seconds.
    LockTimeRatio double
    The ratio of the total lock waiting time of SQL, in %.
    Md5 string
    MD5 value of SOL template.
    QueryTime double
    Total time, in seconds.
    QueryTimeAvg double
    Average execution time, in seconds.
    QueryTimeMax double
    The maximum execution time, in seconds.
    QueryTimeMin double
    The minimum execution time, in seconds.
    QueryTimeRatio double
    Total time-consuming ratio, unit %.
    RowsExamined double
    total scan lines.
    RowsExaminedAvg double
    average number of lines scanned.
    RowsExaminedMax double
    Maximum number of scan lines.
    RowsExaminedMin double
    Minimum number of scan lines.
    RowsExaminedRatio double
    The proportion of the total number of scanned lines, unit %.
    RowsSent double
    total number of rows returned.
    RowsSentAvg double
    average number of rows returned.
    RowsSentMax double
    Maximum number of rows returned.
    RowsSentMin double
    Minimum number of rows returned.
    RowsSentRatio double
    The proportion of the total number of rows returned, in %.
    Schema string
    Database name.
    SqlTemplate string
    sql template.
    SqlText string
    SQL with parameters (random).
    ExecTimes float64
    Execution times.
    LockTime float64
    SQL total lock waiting time, in seconds.
    LockTimeAvg float64
    Average lock waiting time, in seconds.
    LockTimeMax float64
    Maximum lock waiting time, in seconds.
    LockTimeMin float64
    Minimum lock waiting time, in seconds.
    LockTimeRatio float64
    The ratio of the total lock waiting time of SQL, in %.
    Md5 string
    MD5 value of SOL template.
    QueryTime float64
    Total time, in seconds.
    QueryTimeAvg float64
    Average execution time, in seconds.
    QueryTimeMax float64
    The maximum execution time, in seconds.
    QueryTimeMin float64
    The minimum execution time, in seconds.
    QueryTimeRatio float64
    Total time-consuming ratio, unit %.
    RowsExamined float64
    total scan lines.
    RowsExaminedAvg float64
    average number of lines scanned.
    RowsExaminedMax float64
    Maximum number of scan lines.
    RowsExaminedMin float64
    Minimum number of scan lines.
    RowsExaminedRatio float64
    The proportion of the total number of scanned lines, unit %.
    RowsSent float64
    total number of rows returned.
    RowsSentAvg float64
    average number of rows returned.
    RowsSentMax float64
    Maximum number of rows returned.
    RowsSentMin float64
    Minimum number of rows returned.
    RowsSentRatio float64
    The proportion of the total number of rows returned, in %.
    Schema string
    Database name.
    SqlTemplate string
    sql template.
    SqlText string
    SQL with parameters (random).
    execTimes Double
    Execution times.
    lockTime Double
    SQL total lock waiting time, in seconds.
    lockTimeAvg Double
    Average lock waiting time, in seconds.
    lockTimeMax Double
    Maximum lock waiting time, in seconds.
    lockTimeMin Double
    Minimum lock waiting time, in seconds.
    lockTimeRatio Double
    The ratio of the total lock waiting time of SQL, in %.
    md5 String
    MD5 value of SOL template.
    queryTime Double
    Total time, in seconds.
    queryTimeAvg Double
    Average execution time, in seconds.
    queryTimeMax Double
    The maximum execution time, in seconds.
    queryTimeMin Double
    The minimum execution time, in seconds.
    queryTimeRatio Double
    Total time-consuming ratio, unit %.
    rowsExamined Double
    total scan lines.
    rowsExaminedAvg Double
    average number of lines scanned.
    rowsExaminedMax Double
    Maximum number of scan lines.
    rowsExaminedMin Double
    Minimum number of scan lines.
    rowsExaminedRatio Double
    The proportion of the total number of scanned lines, unit %.
    rowsSent Double
    total number of rows returned.
    rowsSentAvg Double
    average number of rows returned.
    rowsSentMax Double
    Maximum number of rows returned.
    rowsSentMin Double
    Minimum number of rows returned.
    rowsSentRatio Double
    The proportion of the total number of rows returned, in %.
    schema String
    Database name.
    sqlTemplate String
    sql template.
    sqlText String
    SQL with parameters (random).
    execTimes number
    Execution times.
    lockTime number
    SQL total lock waiting time, in seconds.
    lockTimeAvg number
    Average lock waiting time, in seconds.
    lockTimeMax number
    Maximum lock waiting time, in seconds.
    lockTimeMin number
    Minimum lock waiting time, in seconds.
    lockTimeRatio number
    The ratio of the total lock waiting time of SQL, in %.
    md5 string
    MD5 value of SOL template.
    queryTime number
    Total time, in seconds.
    queryTimeAvg number
    Average execution time, in seconds.
    queryTimeMax number
    The maximum execution time, in seconds.
    queryTimeMin number
    The minimum execution time, in seconds.
    queryTimeRatio number
    Total time-consuming ratio, unit %.
    rowsExamined number
    total scan lines.
    rowsExaminedAvg number
    average number of lines scanned.
    rowsExaminedMax number
    Maximum number of scan lines.
    rowsExaminedMin number
    Minimum number of scan lines.
    rowsExaminedRatio number
    The proportion of the total number of scanned lines, unit %.
    rowsSent number
    total number of rows returned.
    rowsSentAvg number
    average number of rows returned.
    rowsSentMax number
    Maximum number of rows returned.
    rowsSentMin number
    Minimum number of rows returned.
    rowsSentRatio number
    The proportion of the total number of rows returned, in %.
    schema string
    Database name.
    sqlTemplate string
    sql template.
    sqlText string
    SQL with parameters (random).
    exec_times float
    Execution times.
    lock_time float
    SQL total lock waiting time, in seconds.
    lock_time_avg float
    Average lock waiting time, in seconds.
    lock_time_max float
    Maximum lock waiting time, in seconds.
    lock_time_min float
    Minimum lock waiting time, in seconds.
    lock_time_ratio float
    The ratio of the total lock waiting time of SQL, in %.
    md5 str
    MD5 value of SOL template.
    query_time float
    Total time, in seconds.
    query_time_avg float
    Average execution time, in seconds.
    query_time_max float
    The maximum execution time, in seconds.
    query_time_min float
    The minimum execution time, in seconds.
    query_time_ratio float
    Total time-consuming ratio, unit %.
    rows_examined float
    total scan lines.
    rows_examined_avg float
    average number of lines scanned.
    rows_examined_max float
    Maximum number of scan lines.
    rows_examined_min float
    Minimum number of scan lines.
    rows_examined_ratio float
    The proportion of the total number of scanned lines, unit %.
    rows_sent float
    total number of rows returned.
    rows_sent_avg float
    average number of rows returned.
    rows_sent_max float
    Maximum number of rows returned.
    rows_sent_min float
    Minimum number of rows returned.
    rows_sent_ratio float
    The proportion of the total number of rows returned, in %.
    schema str
    Database name.
    sql_template str
    sql template.
    sql_text str
    SQL with parameters (random).
    execTimes Number
    Execution times.
    lockTime Number
    SQL total lock waiting time, in seconds.
    lockTimeAvg Number
    Average lock waiting time, in seconds.
    lockTimeMax Number
    Maximum lock waiting time, in seconds.
    lockTimeMin Number
    Minimum lock waiting time, in seconds.
    lockTimeRatio Number
    The ratio of the total lock waiting time of SQL, in %.
    md5 String
    MD5 value of SOL template.
    queryTime Number
    Total time, in seconds.
    queryTimeAvg Number
    Average execution time, in seconds.
    queryTimeMax Number
    The maximum execution time, in seconds.
    queryTimeMin Number
    The minimum execution time, in seconds.
    queryTimeRatio Number
    Total time-consuming ratio, unit %.
    rowsExamined Number
    total scan lines.
    rowsExaminedAvg Number
    average number of lines scanned.
    rowsExaminedMax Number
    Maximum number of scan lines.
    rowsExaminedMin Number
    Minimum number of scan lines.
    rowsExaminedRatio Number
    The proportion of the total number of scanned lines, unit %.
    rowsSent Number
    total number of rows returned.
    rowsSentAvg Number
    average number of rows returned.
    rowsSentMax Number
    Maximum number of rows returned.
    rowsSentMin Number
    Minimum number of rows returned.
    rowsSentRatio Number
    The proportion of the total number of rows returned, in %.
    schema String
    Database name.
    sqlTemplate String
    sql template.
    sqlText String
    SQL with parameters (random).

    GetDbbrainSlowLogTopSqlsSchemaList

    Schema string
    DB name.
    Schema string
    DB name.
    schema String
    DB name.
    schema string
    DB name.
    schema str
    DB name.
    schema String
    DB name.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack