Updated on 2026-09-20 GMT+08:00

Querying Top Objects

Function

This API is used to query top objects in a database of a specified instance.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
  • If you are using role/policy-based authorization, see Permissions and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

rds:instance:get

read

instance

-

rds:instance:list

-

URI

  • URI format

    GET /v3/{project_id}/instances/{instance_id}/ops/top/objects

  • Parameter description
    Table 1 Parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Definition

    Project ID of a tenant in a region.

    To obtain the value, see Obtaining a Project ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    instance_id

    Yes

    String

    Definition

    Instance ID.

    You can obtain the value of this parameter from id in Table 4 by calling the API for querying DB instances.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    top

    No

    Integer

    Definition

    Number of top rows.

    Constraints

    N/A

    Range

    • 5
    • 10
    • 15

    Default Value

    10

    database_name

    No

    String

    Definition

    Database name.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    order

    No

    String

    Definition

    Sorting rule.

    Constraints

    N/A

    Range

    • total_elapsed_time: total execution duration
    • total_worker_time: total CPU time
    • total_logical_reads: total logical reads
    • total_logical_writes: total logical writes
    • total_physical_reads: total physical reads
    • total_rows: total number of rows

    Default Value

    total_elapsed_time

Request

None

Example Request

Query top objects in a database of a specified instance.

GET https://{endpoint}/v3/5a7a69c429aa41b8a565c9a4995afea0/instances/a7cd8ced1bcd4de88770dbda1f24f0f7in04/ops/top/objects?top=5&order=total_worker_time&database_name=test

Response

  • Normal response
    Table 2 Parameters

    Parameter

    Type

    Description

    cur_time

    Integer

    Definition

    Update time (timestamp in milliseconds).

    Range

    N/A

    top_object_list

    Array of objects

    Definition

    Top object details.

    For details, see Table 3.

    top_object_overview_list

    Array of objects

    Definition

    Top object overview.

    For details, see Table 4.

    Table 3 top_object_list field description

    Parameter

    Type

    Description

    row_id

    String

    Definition

    Row number.

    Range

    N/A

    database_name

    String

    Definition

    Database name.

    Range

    N/A

    schema_name

    String

    Definition

    Schema name.

    Range

    N/A

    object_name

    String

    Definition

    Object name.

    Range

    N/A

    object_id

    String

    Definition

    Object ID.

    Range

    N/A

    object_type

    String

    Definition

    Object type.

    Range

    • SQL_TRIGGER: SQL trigger
    • SQL_STORED_PROCEDURE: SQL stored procedure
    • SQL_VIEW: SQL view

    sql_statement

    String

    Definition

    SQL text.

    Range

    N/A

    execution_count

    String

    Definition

    Number of executions.

    Range

    N/A

    plan_generation_num

    String

    Definition

    Execution plan fetches.

    Range

    N/A

    last_execution_time

    String

    Definition

    Last execution time.

    Range

    N/A

    avg_worker_time

    String

    Definition

    Average CPU time, in milliseconds.

    Range

    N/A

    total_worker_time

    String

    Definition

    Total CPU time, in milliseconds.

    Range

    N/A

    last_worker_time

    String

    Definition

    Recent CPU time, in milliseconds.

    Range

    N/A

    min_worker_time

    String

    Definition

    Minimum CPU time, in milliseconds.

    Range

    N/A

    max_worker_time

    String

    Definition

    Maximum CPU time, in milliseconds.

    Range

    N/A

    avg_logical_reads

    String

    Definition

    Average logical reads. One logical page equals 8 KB.

    Range

    N/A

    total_logical_reads

    String

    Definition

    Total logical reads. One logical page equals 8 KB.

    Range

    N/A

    last_logical_reads

    String

    Definition

    Recent logical reads. One logical page equals 8 KB.

    Range

    N/A

    min_logical_reads

    String

    Definition

    Minimum logical reads. One logical page equals 8 KB.

    Range

    N/A

    max_logical_reads

    String

    Definition

    Maximum logical reads. One logical page equals 8 KB.

    Range

    N/A

    avg_logical_writes

    String

    Definition

    Average logical writes. One logical page equals 8 KB.

    Range

    N/A

    total_logical_writes

    String

    Definition

    Total logical writes. One logical page equals 8 KB.

    Range

    N/A

    last_logical_writes

    String

    Definition

    Recent logical writes. One logical page equals 8 KB.

    Range

    N/A

    min_logical_writes

    String

    Definition

    Minimum logical writes. One logical page equals 8 KB.

    Range

    N/A

    max_logical_writes

    String

    Definition

    Maximum logical writes. One logical page equals 8 KB.

    Range

    N/A

    avg_logical_io

    String

    Definition

    Average logical I/O. One logical page equals 8 KB.

    Range

    N/A

    total_logical_io

    String

    Definition

    Total logical I/O. One logical page equals 8 KB.

    Range

    N/A

    last_logical_io

    String

    Definition

    Recent logical I/O. One logical page equals 8 KB.

    Range

    N/A

    min_logical_io

    String

    Definition

    Minimum logical I/O. One logical page equals 8 KB.

    Range

    N/A

    max_logical_io

    String

    Definition

    Maximum logical I/O. One logical page equals 8 KB.

    Range

    N/A

    avg_physical_reads

    String

    Definition

    Average physical reads. One logical page equals 8 KB.

    Range

    N/A

    total_physical_reads

    String

    Definition

    Total physical reads. One logical page equals 8 KB.

    Range

    N/A

    last_physical_reads

    String

    Definition

    Recent physical reads. One logical page equals 8 KB.

    Range

    N/A

    min_physical_reads

    String

    Definition

    Minimum physical reads. One logical page equals 8 KB.

    Range

    N/A

    max_physical_reads

    String

    Definition

    Maximum physical reads. One logical page equals 8 KB.

    Range

    N/A

    avg_elapsed_time

    String

    Definition

    Average execution duration, in milliseconds.

    Range

    N/A

    total_elapsed_time

    String

    Definition

    Total execution duration, in milliseconds.

    Range

    N/A

    last_elapsed_time

    String

    Definition

    Recent execution duration, in milliseconds.

    Range

    N/A

    min_elapsed_time

    String

    Definition

    Minimum execution duration, in milliseconds.

    Range

    N/A

    max_elapsed_time

    String

    Definition

    Maximum execution duration, in milliseconds.

    Range

    N/A

    avg_rows

    String

    Definition

    Average rows returned.

    Range

    N/A

    total_rows

    String

    Definition

    Total rows returned.

    Range

    N/A

    last_rows

    String

    Definition

    Recent rows returned.

    Range

    N/A

    min_rows

    String

    Definition

    Minimum rows returned.

    Range

    N/A

    max_rows

    String

    Definition

    Maximum rows returned.

    Range

    N/A

    Table 4 top_object_overview_list field description

    Parameter

    Type

    Description

    avg_cpu_time

    Double

    Definition

    Average CPU time, in milliseconds.

    Range

    N/A

    avg_cpu_time_percentage

    Double

    Definition

    Average CPU time, in percentage.

    Range

    N/A

    avg_execution_time

    Double

    Definition

    Average execution duration, in milliseconds.

    Range

    N/A

    avg_execution_time_percentage

    Double

    Definition

    Average execution duration, in percentage.

    Range

    N/A

    avg_logical_io

    Double

    Definition

    Average logical I/O. One logical page equals 8 KB.

    Range

    N/A

    avg_logical_io_percentage

    Double

    Definition

    Average logical I/O, in percentage.

    Range

    N/A

    avg_logical_reads

    Double

    Definition

    Average logical reads. One logical page equals 8 KB.

    Range

    N/A

    avg_logical_reads_percentage

    Double

    Definition

    Average logical reads, in percentage.

    Range

    N/A

    avg_logical_writes

    Double

    Definition

    Average logical writes. One logical page equals 8 KB.

    Range

    N/A

    avg_logical_writes_percentage

    Double

    Definition

    Average logical writes, in percentage.

    Range

    N/A

    avg_physical_reads

    Double

    Definition

    Average physical reads. One logical page equals 8 KB.

    Range

    N/A

    avg_physical_reads_percentage

    Double

    Definition

    Average physical reads, in percentage.

    Range

    N/A

    avg_rows

    Double

    Definition

    Average rows returned.

    Range

    N/A

    avg_rows_percentage

    Double

    Definition

    Average rows returned, in percentage.

    Range

    N/A

    database_name

    String

    Definition

    Database name.

    Range

    N/A

    object_id

    String

    Definition

    Object ID.

    Range

    N/A

    object_name

    String

    Definition

    Object name.

    Range

    N/A

    row_id

    String

    Definition

    Row number.

    Range

    N/A

    object_type

    String

    Definition

    Object type.

    Range

    N/A

    schema_name

    String

    Definition

    Schema name.

    Range

    N/A

    total_cpu_time

    Double

    Definition

    Total CPU time, in milliseconds.

    Range

    N/A

    total_cpu_time_percentage

    Double

    Definition

    Total CPU time, in percentage.

    Range

    N/A

    total_execution_time

    Double

    Definition

    Total execution duration, in milliseconds.

    Range

    N/A

    total_execution_time_percentage

    Double

    Definition

    Total execution duration, in percentage.

    Range

    N/A

    total_execution_count

    Double

    Definition

    Total executions.

    Range

    N/A

    total_logical_io

    Double

    Definition

    Total logical I/O.

    Range

    N/A

    total_logical_io_percentage

    Double

    Definition

    Total logical I/O, in percentage.

    Range

    N/A

    total_logical_reads

    Double

    Definition

    Total logical reads.

    Range

    N/A

    total_logical_reads_percentage

    Double

    Definition

    Total logical reads, in percentage.

    Range

    N/A

    total_logical_writes

    Double

    Definition

    Total logical writes.

    Range

    N/A

    total_logical_writes_percentage

    Double

    Definition

    Total logical writes, in percentage.

    Range

    N/A

    total_physical_reads

    Double

    Definition

    Total physical reads.

    Range

    N/A

    total_physical_reads_percentage

    Double

    Definition

    Total physical reads, in percentage.

    Range

    N/A

    total_rows

    Double

    Definition

    Total rows returned.

    Range

    N/A

    total_rows_percentage

    Double

    Definition

    Total rows returned, in percentage.

    Range

    N/A

  • Example normal response
    {
      "cur_time": 1784795293536,
      "top_object_list": [
        {
          "row_id": "1",
          "database_name": "test",
          "schema_name": "dbo",
          "object_name": "test",
          "object_id": "1285579618",
          "object_type": "SQL_STORED_PROCEDURE",
          "sql_statement": "SELECT TOP (1000) [id]\r\n      ,[name]\r\n      ,[birdate]\r\n      ,[tel]\r\n      ,[note]\r\n  FROM [test].[dbo].[test0103a]",
          "execution_count": "3",
          "plan_generation_num": "1",
          "last_execution_time": "2026-07-23 16:28:03",
          "avg_worker_time": "0.07",
          "total_worker_time": "0.224",
          "last_worker_time": "0.045",
          "min_worker_time": "0.045",
          "max_worker_time": "0.131",
          "avg_logical_reads": "0.00",
          "total_logical_reads": "0",
          "last_logical_reads": "0",
          "min_logical_reads": "0",
          "max_logical_reads": "0",
          "avg_logical_writes": "0.00",
          "total_logical_writes": "0",
          "last_logical_writes": "0",
          "min_logical_writes": "0",
          "max_logical_writes": "0",
          "avg_logical_io": "0.00",
          "total_logical_io": "0",
          "last_logical_io": "0",
          "min_logical_io": "0",
          "max_logical_io": "0",
          "avg_physical_reads": "0.00",
          "total_physical_reads": "0",
          "last_physical_reads": "0",
          "min_physical_reads": "0",
          "max_physical_reads": "0",
          "avg_elapsed_time": "0.08",
          "total_elapsed_time": "0.231",
          "last_elapsed_time": "0.048",
          "min_elapsed_time": "0.048",
          "max_elapsed_time": "0.133",
          "avg_rows": "0.00",
          "total_rows": "0",
          "last_rows": "0",
          "min_rows": "0",
          "max_rows": "0"
        }
      ],
      "top_object_overview_list": [
        {
          "avg_cpu_time": 0.07,
          "avg_cpu_time_percentage": 1.0,
          "avg_execution_time": 0.08,
          "avg_execution_time_percentage": 1.0,
          "avg_logical_io": 0.0,
          "avg_logical_io_percentage": 0.0,
          "avg_logical_reads": 0.0,
          "avg_logical_reads_percentage": 0.0,
          "avg_logical_writes": 0.0,
          "avg_logical_writes_percentage": 0.0,
          "avg_physical_reads": 0.0,
          "avg_physical_reads_percentage": 0.0,
          "avg_rows": 0.0,
          "avg_rows_percentage": 0.0,
          "database_name": "test",
          "object_id": "1285579618",
          "object_name": "test",
          "row_id": "1",
          "object_type": "SQL_STORED_PROCEDURE",
          "schema_name": "dbo",
          "total_cpu_time": 0.224,
          "total_cpu_time_percentage": 1.0,
          "total_execution_time": 0.231,
          "total_execution_time_percentage": 1.0,
          "total_execution_count": 3.0,
          "total_logical_io": 0.0,
          "total_logical_io_percentage": 0.0,
          "total_logical_reads": 0.0,
          "total_logical_reads_percentage": 0.0,
          "total_logical_writes": 0.0,
          "total_logical_writes_percentage": 0.0,
          "total_physical_reads": 0.0,
          "total_physical_reads_percentage": 0.0,
          "total_rows": 0.0,
          "total_rows_percentage": 0.0
        }
      ]
    }
  • Abnormal response

    For details, see Abnormal Response Results.

Status Code

Error Code

For details, see Error Codes.