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

test: events: test sqlite indexes used in query plan of all selects and updates #12267

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

rvagg
Copy link
Member

@rvagg rvagg commented Jul 19, 2024

This is a stacked PR ontop of #12261; I'm doing it separately because it moves a bunch of things around that are a bit of a distraction in #12261 and I think it's probably easier to see and review as a separate commit.

This is all about running EXPLAIN QUERY PLAN on all selects and updates in the events db and ensuring that an acceptable index is used as the first step in the execution. We want to either narrow down by height or tipset and we have a few indexes that do this across two tables.

This should lock in the perf gains in #12261 such that any future tinkering with the indexes will fail this test and cause the author to consider carefully whether the change is appropriate.

@rvagg rvagg requested review from BigLep and aarshkshah1992 July 19, 2024 10:40
Copy link
Member

@BigLep BigLep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow - good stuff. Conceptually makes sense and seems right to me. Thanks for doing this.

chain/events/filter/index_test.go Outdated Show resolved Hide resolved
chain/events/filter/index_test.go Outdated Show resolved Hide resolved
@rvagg rvagg force-pushed the rvagg/query-plan-check branch from 354377c to 5c7ef31 Compare July 22, 2024 02:23
@rvagg rvagg added the skip/changelog This change does not require CHANGELOG.md update label Jul 22, 2024
@rvagg rvagg force-pushed the rvagg/query-plan-check branch from 5c7ef31 to d2f6776 Compare July 22, 2024 03:16
@rvagg rvagg force-pushed the rvagg/events-db-perf branch from 40aa442 to 7d9e21e Compare July 22, 2024 07:23
@rvagg rvagg force-pushed the rvagg/query-plan-check branch from d2f6776 to 1b06f5e Compare July 22, 2024 07:24
@rvagg rvagg merged commit 2a3337e into rvagg/events-db-perf Jul 23, 2024
77 checks passed
@rvagg rvagg deleted the rvagg/query-plan-check branch July 23, 2024 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip/changelog This change does not require CHANGELOG.md update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants