Drop the obsolete idx_code_code_first_75 index - #2937
Open
manuelwedler wants to merge 2 commits into
Open
Conversation
The similarity query of server 4.0.0 reads compiled_contracts_runtime_code_prefixes; the old prefix index on the code table was kept only as rollback insurance and is verified obsolete in production. Frees 1.1 GB.
manuelwedler
force-pushed
the
chore/drop-idx-code-code-first-75
branch
from
August 20, 2026 09:05
b2ff7ef to
01d0143
Compare
kuzdogan
approved these changes
Aug 24, 2026
Member
|
TODO: Run on staging |
Member
|
TODO 2: Find a naming convention to mark this has a todo for release time. Potentially if the release script finds the naming convention like |
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #2918 (see #2891): drops
idx_code_code_first_75on thecodetable.Server 4.0.0 finds similarity candidates through the
compiled_contracts_runtime_code_prefixesside table. The old prefix index served only the pre-4.0.0 query and was kept as rollback insurance. The new query is now verified on production: worst-case candidate search (prefix shared by ~102k compilations) runs in 75 ms, typical cold lookups in ~156 ms, batch payload fetch in ~94 ms.The index takes 1.1 GB on production. The drop is instant; the
migrate:downrecreation scans the wholecodetable and takes several minutes.Notes
migrate:downfirst (recreates the index).