rds.query-insights.list-tables

Tables and indexes with findings: sequential scans, unused and duplicate indexes, vacuum overdue

GET /rds/api/instances/{id}/insights/tablesIAM rds:DescribeDBQueryInsightsRead

Request syntax

GET /rds/api/instances/{id}/insights/tables

Path parameters

  • idRequired

    string

    Constraints: 3-64 chars, /^(?!ewdoc-)[a-z0-9-]+$/

Response

200 with database, tables (schema, table, rows, deadRows, bytes, seqScans, seqRowsRead, indexScans, lastVacuum, lastAnalyze, findings) and indexFindings.

A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.

Fields of data

  • databaseAlways

    string

    Database read
  • tablesAlways

    array of object

    Up to 200 tables, largest first
  • tables[].​schemaAlways

    string

    Schema
  • tables[].​tableAlways

    string

    Table
  • tables[].​rowsAlways

    number

    Live rows (estimate)
  • tables[].​deadRowsAlways

    number

    Dead rows waiting for vacuum
  • tables[].​bytesAlways

    number

    Size with indexes, bytes
  • tables[].​seqScansAlways

    number

    Sequential scans
  • tables[].​seqRowsReadAlways

    number

    Rows those scans read
  • tables[].​indexScansAlways

    number, may be null

    Index scans; null: no index
  • tables[].​lastVacuumAlways

    string, may be null

    Last vacuum; null: never
  • tables[].​lastAnalyzeAlways

    string, may be null

    Last analyze; null: never
  • tables[].​findingsAlways

    array of object

    Findings with suggested actions
  • tables[].​findings[].​kindAlways

    one of slow-average, slow-sometimes, missing-index, spills-to-disk, n-plus-one, seq-scan-large-table, unused-index, duplicate-index, vacuum-overdue, long-running, idle-in-transaction, lock-wait

    What was found
  • tables[].​findings[].​severityAlways

    one of high, medium, info

    How much it matters
  • tables[].​findings[].​titleAlways

    string

    One line: what was seen
  • tables[].​findings[].​evidenceAlways

    string

    The numbers behind it
  • tables[].​findings[].​actionAlways

    string

    What to do about it
  • tables[].​findings[].​sqlWhen present

    string

    A statement to copy and run yourself (CREATE INDEX CONCURRENTLY, …); absent when none
  • indexFindingsAlways

    array of object

    Unused and duplicate indexes
  • indexFindings[].​kindAlways

    one of slow-average, slow-sometimes, missing-index, spills-to-disk, n-plus-one, seq-scan-large-table, unused-index, duplicate-index, vacuum-overdue, long-running, idle-in-transaction, lock-wait

    What was found
  • indexFindings[].​severityAlways

    one of high, medium, info

    How much it matters
  • indexFindings[].​titleAlways

    string

    One line: what was seen
  • indexFindings[].​evidenceAlways

    string

    The numbers behind it
  • indexFindings[].​actionAlways

    string

    What to do about it
  • indexFindings[].​sqlWhen present

    string

    A statement to copy and run yourself (CREATE INDEX CONCURRENTLY, …); absent when none
  • indexFindings[].​tableAlways

    string

    Table of the index
  • indexFindings[].​indexAlways

    string

    The index

Checked against the handlers: every route test validates their answers against this schema.

Errors

  • 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
  • 401No credentials, or an access key that is unknown, revoked or expired.
  • 403The caller's policies do not allow rds:DescribeDBQueryInsights on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
  • 404The resource does not exist in your organization.

Examples

The required parameters only, with example values. Replace id and the other placeholders with your own.

dcloud rds query-insights list-tables id

Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_rds_query-insights_list-tables.