Skip to content

sql: implement virtual index on crdb_internal.{statement, transaction}_statistics #69321

@Azhng

Description

@Azhng

Currently crdb_internal.{statement, transaction}_statistics is implemented using generator for the virtual table. This causes us to issue queries that perform full table scan on system.{statement, transaction}_statistics.

Since we are mostly doing scan based on aggregated_ts time ranges, we should add support for virtual index. This can enable us to issue better queries and avoid full table scan.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-sql-observabilityRelated to observability of the SQL layerC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions