Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Tracked by #64743
Azhng opened this issue Aug 24, 2021 · 2 comments
Closed
Tracked by #64743
Labels
A-sql-observability Related to observability of the SQL layer C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@Azhng
Copy link
Contributor

Azhng commented Aug 24, 2021

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.

@blathers-crl
Copy link

blathers-crl bot commented Aug 24, 2021

Hi @Azhng, please add a C-ategory label to your issue. Check out the label system docs.

While you're here, please consider adding an A- label to help keep our repository tidy.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

@Azhng Azhng changed the title Implement virtual index on crdb_internal.{statement, transaction}_statistics sql: mplement virtual index on crdb_internal.{statement, transaction}_statistics Aug 24, 2021
@Azhng Azhng changed the title sql: mplement virtual index on crdb_internal.{statement, transaction}_statistics sql: implement virtual index on crdb_internal.{statement, transaction}_statistics Aug 24, 2021
@Azhng Azhng added A-sql-observability Related to observability of the SQL layer C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-observability labels Aug 24, 2021
@blathers-crl blathers-crl bot added this to Triage in Cluster Observability Aug 24, 2021
@maryliag maryliag moved this from Triage to Backlog in Cluster Observability Aug 30, 2021
@Azhng
Copy link
Contributor Author

Azhng commented Jan 13, 2022

virtual index cannot solve this problem. The underlying issue is the predicate is not being pushed down into the virtual table. Opened #74806 instead.

@Azhng Azhng closed this as completed Jan 13, 2022
Cluster Observability automation moved this from Backlog to Done Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-observability Related to observability of the SQL layer C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

No branches or pull requests

1 participant