Updated on 2025-12-09 GMT+08:00

Querying Tables Without Indexes

Function

This API is used to query tables without indexes.

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, no identity policy-based permissions are required for calling this API.

URI

  • URI format

    GET /v3/{project_id}/instances/{instance_id}/no-index-tables?newest={newest}&table_type={table_type}

  • 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

    ID of the instance to be queried.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    newest

    Yes

    Boolean

    Definition

    Whether to retrieve the latest tables without indexes.

    Constraints

    N/A

    Range

    • true: Retrieve the latest tables without indexes.
    • false: Do not retrieve the latest tables without indexes.

    Default Value

    N/A

    table_type

    Yes

    String

    Definition

    Table type.

    Constraints

    N/A

    Range

    no_primary_key: tables without primary keys

    Default Value

    N/A

Request Parameters

None

Example Request

Query database tables without indexes.

GET https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/6101f874435e4e63803976874b540dc2in03/no-index-tables?newest=true&table_type=no_primary_key

Response

  • Normal response
    Table 2 Parameters

    Parameter

    Type

    Description

    tables

    List<Table>

    Definition

    List of tables without indexes. For details, see Table 3.

    last_diagnose_timestamp

    Long

    Definition

    Time in the timestamp format.

    Range

    N/A

    total_count

    Integer

    Definition

    Number of tables.

    Range

    N/A

    Table 3 tables field data structure description

    Parameter

    Type

    Description

    db_name

    String

    Definition

    Database name.

    Range

    N/A

    schema_name

    String

    Definition

    Schema name.

    Range

    N/A

    table_name

    String

    Definition

    Table name.

    Range

    N/A

  • Example normal response
    {
        "tables": [
            {
                "db_name": "mydb",
                "schema_name": "public",
                "table_name": "employees"
            }
        ],
        "last_diagnose_timestamp": 1757218828,
        "total_count": 1
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.