tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
tencentcloud.getDbbrainSlowLogTopSqls
Start a Neo task
Explain and create a tencentcloud.getDbbrainSlowLogTopSqls resource
tencentcloud 1.82.35 published on Friday, Nov 7, 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({
instanceId: "%s",
startTime: "%s",
endTime: "%s",
sortBy: "QueryTimeMax",
orderBy: "ASC",
product: "mysql",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
test = tencentcloud.get_dbbrain_slow_log_top_sqls(instance_id="%s",
start_time="%s",
end_time="%s",
sort_by="QueryTimeMax",
order_by="ASC",
product="mysql")
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{
InstanceId: "%s",
StartTime: "%s",
EndTime: "%s",
SortBy: pulumi.StringRef("QueryTimeMax"),
OrderBy: pulumi.StringRef("ASC"),
Product: pulumi.StringRef("mysql"),
}, 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()
{
InstanceId = "%s",
StartTime = "%s",
EndTime = "%s",
SortBy = "QueryTimeMax",
OrderBy = "ASC",
Product = "mysql",
});
});
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()
.instanceId("%s")
.startTime("%s")
.endTime("%s")
.sortBy("QueryTimeMax")
.orderBy("ASC")
.product("mysql")
.build());
}
}
variables:
test:
fn::invoke:
function: tencentcloud:getDbbrainSlowLogTopSqls
arguments:
instanceId: '%s'
startTime: '%s'
endTime: '%s'
sortBy: QueryTimeMax
orderBy: ASC
product: mysql
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 dictionaryThe following arguments are supported:
- End
Time 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. - Instance
Id string - instance id.
- Start
Time string - Start time, such as
2019-09-10 12:13:14. - Id string
- Order
By 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 ismysql. - Result
Output stringFile - Used to save results.
- Schema
Lists List<GetDbbrain Slow Log Top Sqls Schema List> - Array of database names.
- Sort
By string - Sort key, currently supports sort keys such as QueryTime, ExecTimes, RowsSent, LockTime and RowsExamined, the default is QueryTime.
- End
Time 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. - Instance
Id string - instance id.
- Start
Time string - Start time, such as
2019-09-10 12:13:14. - Id string
- Order
By 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 ismysql. - Result
Output stringFile - Used to save results.
- Schema
Lists []GetDbbrain Slow Log Top Sqls Schema List - Array of database names.
- Sort
By string - Sort key, currently supports sort keys such as QueryTime, ExecTimes, RowsSent, LockTime and RowsExamined, the default is QueryTime.
- end
Time 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. - instance
Id String - instance id.
- start
Time String - Start time, such as
2019-09-10 12:13:14. - id String
- order
By 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 ismysql. - result
Output StringFile - Used to save results.
- schema
Lists List<GetDbbrain Slow Log Top Sqls Schema List> - Array of database names.
- sort
By String - Sort key, currently supports sort keys such as QueryTime, ExecTimes, RowsSent, LockTime and RowsExamined, the default is QueryTime.
- end
Time 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. - instance
Id string - instance id.
- start
Time string - Start time, such as
2019-09-10 12:13:14. - id string
- order
By 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 ismysql. - result
Output stringFile - Used to save results.
- schema
Lists GetDbbrain Slow Log Top Sqls Schema List[] - Array of database names.
- sort
By 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 ismysql. - result_
output_ strfile - Used to save results.
- schema_
lists Sequence[GetDbbrain Slow Log Top Sqls Schema List] - 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.
- end
Time 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. - instance
Id String - instance id.
- start
Time String - Start time, such as
2019-09-10 12:13:14. - id String
- order
By 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 ismysql. - result
Output StringFile - Used to save results.
- schema
Lists List<Property Map> - Array of database names.
- sort
By 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:
- End
Time string - Id string
- Instance
Id string - Rows
List<Get
Dbbrain Slow Log Top Sqls Row> - Slow log top sql list.
- Start
Time string - Order
By string - Product string
- Result
Output stringFile - Schema
Lists List<GetDbbrain Slow Log Top Sqls Schema List> - Sort
By string
- End
Time string - Id string
- Instance
Id string - Rows
[]Get
Dbbrain Slow Log Top Sqls Row - Slow log top sql list.
- Start
Time string - Order
By string - Product string
- Result
Output stringFile - Schema
Lists []GetDbbrain Slow Log Top Sqls Schema List - Sort
By string
- end
Time String - id String
- instance
Id String - rows
List<Get
Dbbrain Slow Log Top Sqls Row> - Slow log top sql list.
- start
Time String - order
By String - product String
- result
Output StringFile - schema
Lists List<GetDbbrain Slow Log Top Sqls Schema List> - sort
By String
- end
Time string - id string
- instance
Id string - rows
Get
Dbbrain Slow Log Top Sqls Row[] - Slow log top sql list.
- start
Time string - order
By string - product string
- result
Output stringFile - schema
Lists GetDbbrain Slow Log Top Sqls Schema List[] - sort
By string
- end_
time str - id str
- instance_
id str - rows
Sequence[Get
Dbbrain Slow Log Top Sqls Row] - Slow log top sql list.
- start_
time str - order_
by str - product str
- result_
output_ strfile - schema_
lists Sequence[GetDbbrain Slow Log Top Sqls Schema List] - sort_
by str
- end
Time String - id String
- instance
Id String - rows List<Property Map>
- Slow log top sql list.
- start
Time String - order
By String - product String
- result
Output StringFile - schema
Lists List<Property Map> - sort
By String
Supporting Types
GetDbbrainSlowLogTopSqlsRow
- Exec
Times double - Execution times.
- Lock
Time double - SQL total lock waiting time, in seconds.
- Lock
Time doubleAvg - Average lock waiting time, in seconds.
- Lock
Time doubleMax - Maximum lock waiting time, in seconds.
- Lock
Time doubleMin - Minimum lock waiting time, in seconds.
- Lock
Time doubleRatio - The ratio of the total lock waiting time of SQL, in %.
- Md5 string
- MD5 value of SOL template.
- Query
Time double - Total time, in seconds.
- Query
Time doubleAvg - Average execution time, in seconds.
- Query
Time doubleMax - The maximum execution time, in seconds.
- Query
Time doubleMin - The minimum execution time, in seconds.
- Query
Time doubleRatio - Total time-consuming ratio, unit %.
- Rows
Examined double - total scan lines.
- Rows
Examined doubleAvg - average number of lines scanned.
- Rows
Examined doubleMax - Maximum number of scan lines.
- Rows
Examined doubleMin - Minimum number of scan lines.
- Rows
Examined doubleRatio - The proportion of the total number of scanned lines, unit %.
- Rows
Sent double - total number of rows returned.
- Rows
Sent doubleAvg - average number of rows returned.
- Rows
Sent doubleMax - Maximum number of rows returned.
- Rows
Sent doubleMin - Minimum number of rows returned.
- Rows
Sent doubleRatio - The proportion of the total number of rows returned, in %.
- Schema string
- Database name.
- Sql
Template string - sql template.
- Sql
Text string - SQL with parameters (random).
- Exec
Times float64 - Execution times.
- Lock
Time float64 - SQL total lock waiting time, in seconds.
- Lock
Time float64Avg - Average lock waiting time, in seconds.
- Lock
Time float64Max - Maximum lock waiting time, in seconds.
- Lock
Time float64Min - Minimum lock waiting time, in seconds.
- Lock
Time float64Ratio - The ratio of the total lock waiting time of SQL, in %.
- Md5 string
- MD5 value of SOL template.
- Query
Time float64 - Total time, in seconds.
- Query
Time float64Avg - Average execution time, in seconds.
- Query
Time float64Max - The maximum execution time, in seconds.
- Query
Time float64Min - The minimum execution time, in seconds.
- Query
Time float64Ratio - Total time-consuming ratio, unit %.
- Rows
Examined float64 - total scan lines.
- Rows
Examined float64Avg - average number of lines scanned.
- Rows
Examined float64Max - Maximum number of scan lines.
- Rows
Examined float64Min - Minimum number of scan lines.
- Rows
Examined float64Ratio - The proportion of the total number of scanned lines, unit %.
- Rows
Sent float64 - total number of rows returned.
- Rows
Sent float64Avg - average number of rows returned.
- Rows
Sent float64Max - Maximum number of rows returned.
- Rows
Sent float64Min - Minimum number of rows returned.
- Rows
Sent float64Ratio - The proportion of the total number of rows returned, in %.
- Schema string
- Database name.
- Sql
Template string - sql template.
- Sql
Text string - SQL with parameters (random).
- exec
Times Double - Execution times.
- lock
Time Double - SQL total lock waiting time, in seconds.
- lock
Time DoubleAvg - Average lock waiting time, in seconds.
- lock
Time DoubleMax - Maximum lock waiting time, in seconds.
- lock
Time DoubleMin - Minimum lock waiting time, in seconds.
- lock
Time DoubleRatio - The ratio of the total lock waiting time of SQL, in %.
- md5 String
- MD5 value of SOL template.
- query
Time Double - Total time, in seconds.
- query
Time DoubleAvg - Average execution time, in seconds.
- query
Time DoubleMax - The maximum execution time, in seconds.
- query
Time DoubleMin - The minimum execution time, in seconds.
- query
Time DoubleRatio - Total time-consuming ratio, unit %.
- rows
Examined Double - total scan lines.
- rows
Examined DoubleAvg - average number of lines scanned.
- rows
Examined DoubleMax - Maximum number of scan lines.
- rows
Examined DoubleMin - Minimum number of scan lines.
- rows
Examined DoubleRatio - The proportion of the total number of scanned lines, unit %.
- rows
Sent Double - total number of rows returned.
- rows
Sent DoubleAvg - average number of rows returned.
- rows
Sent DoubleMax - Maximum number of rows returned.
- rows
Sent DoubleMin - Minimum number of rows returned.
- rows
Sent DoubleRatio - The proportion of the total number of rows returned, in %.
- schema String
- Database name.
- sql
Template String - sql template.
- sql
Text String - SQL with parameters (random).
- exec
Times number - Execution times.
- lock
Time number - SQL total lock waiting time, in seconds.
- lock
Time numberAvg - Average lock waiting time, in seconds.
- lock
Time numberMax - Maximum lock waiting time, in seconds.
- lock
Time numberMin - Minimum lock waiting time, in seconds.
- lock
Time numberRatio - The ratio of the total lock waiting time of SQL, in %.
- md5 string
- MD5 value of SOL template.
- query
Time number - Total time, in seconds.
- query
Time numberAvg - Average execution time, in seconds.
- query
Time numberMax - The maximum execution time, in seconds.
- query
Time numberMin - The minimum execution time, in seconds.
- query
Time numberRatio - Total time-consuming ratio, unit %.
- rows
Examined number - total scan lines.
- rows
Examined numberAvg - average number of lines scanned.
- rows
Examined numberMax - Maximum number of scan lines.
- rows
Examined numberMin - Minimum number of scan lines.
- rows
Examined numberRatio - The proportion of the total number of scanned lines, unit %.
- rows
Sent number - total number of rows returned.
- rows
Sent numberAvg - average number of rows returned.
- rows
Sent numberMax - Maximum number of rows returned.
- rows
Sent numberMin - Minimum number of rows returned.
- rows
Sent numberRatio - The proportion of the total number of rows returned, in %.
- schema string
- Database name.
- sql
Template string - sql template.
- sql
Text string - SQL with parameters (random).
- exec_
times float - Execution times.
- lock_
time float - SQL total lock waiting time, in seconds.
- lock_
time_ floatavg - Average lock waiting time, in seconds.
- lock_
time_ floatmax - Maximum lock waiting time, in seconds.
- lock_
time_ floatmin - Minimum lock waiting time, in seconds.
- lock_
time_ floatratio - 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_ floatavg - Average execution time, in seconds.
- query_
time_ floatmax - The maximum execution time, in seconds.
- query_
time_ floatmin - The minimum execution time, in seconds.
- query_
time_ floatratio - Total time-consuming ratio, unit %.
- rows_
examined float - total scan lines.
- rows_
examined_ floatavg - average number of lines scanned.
- rows_
examined_ floatmax - Maximum number of scan lines.
- rows_
examined_ floatmin - Minimum number of scan lines.
- rows_
examined_ floatratio - The proportion of the total number of scanned lines, unit %.
- rows_
sent float - total number of rows returned.
- rows_
sent_ floatavg - average number of rows returned.
- rows_
sent_ floatmax - Maximum number of rows returned.
- rows_
sent_ floatmin - Minimum number of rows returned.
- rows_
sent_ floatratio - 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).
- exec
Times Number - Execution times.
- lock
Time Number - SQL total lock waiting time, in seconds.
- lock
Time NumberAvg - Average lock waiting time, in seconds.
- lock
Time NumberMax - Maximum lock waiting time, in seconds.
- lock
Time NumberMin - Minimum lock waiting time, in seconds.
- lock
Time NumberRatio - The ratio of the total lock waiting time of SQL, in %.
- md5 String
- MD5 value of SOL template.
- query
Time Number - Total time, in seconds.
- query
Time NumberAvg - Average execution time, in seconds.
- query
Time NumberMax - The maximum execution time, in seconds.
- query
Time NumberMin - The minimum execution time, in seconds.
- query
Time NumberRatio - Total time-consuming ratio, unit %.
- rows
Examined Number - total scan lines.
- rows
Examined NumberAvg - average number of lines scanned.
- rows
Examined NumberMax - Maximum number of scan lines.
- rows
Examined NumberMin - Minimum number of scan lines.
- rows
Examined NumberRatio - The proportion of the total number of scanned lines, unit %.
- rows
Sent Number - total number of rows returned.
- rows
Sent NumberAvg - average number of rows returned.
- rows
Sent NumberMax - Maximum number of rows returned.
- rows
Sent NumberMin - Minimum number of rows returned.
- rows
Sent NumberRatio - The proportion of the total number of rows returned, in %.
- schema String
- Database name.
- sql
Template String - sql template.
- sql
Text 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
tencentcloudTerraform Provider.
tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
