improvement(db): drop unusable date slot and redundant prefix indexes - #8332
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
No issues found across 4 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Re-trigger cubic
|
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 4 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Re-trigger cubic
8e04445 to
fff6736
Compare
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 4 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Re-trigger cubic
This comment has been minimized.
This comment has been minimized.
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 4 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Re-trigger cubic
a447be1 to
a5815cb
Compare
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 4 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Re-trigger cubic
Summary
DROP INDEX CONCURRENTLYmigration (0386), following the 0239 pattern:COMMITbreakpoint,lock_timeout 0, idempotent replay{emb,doc}_date1_idx/date2_idx: tag filters comparecol::date, which a plain timestamp btree can never match, so these are written on every chunk insert and document update and never serve a queryemb_kb_id_idx: covered byemb_kb_enabled_idx/emb_kb_model_idxemb_doc_id_idx: covered byemb_doc_chunk_idx/emb_doc_enabled_idxusage_log_workspace_id_idx: covered byusage_log_workspace_created_at_idxcopilot_runs_execution_id_idx: covered bycopilot_runs_execution_started_at_idxnumberandbooleantag-slot index. The vector leg's short-result rescue probe checks tag filters with anEXISTSoverembeddingthat relies on them, and without them a selective number/boolean filter turns that probe into a table-wide scancopilot_runschat/workspace indexesType of Change
Testing
retrieveKnowledgeSearch, 58 shapes, 732k-chunk multi-tenant fixture, EXPLAIN ANALYZE BUFFERS per statement): with the prefix and date drops, every shape keeps its plan and latency within noise, and results are identical. Plans move to the covering composites. The same run showed that dropping the number/boolean slot indexes regresses filtered vector search, so those are keptdocument_id = ANY(...)) stays an index scan on the covering composite with the same leading column asIndex Conddrizzle-kit generatereports no drift, andcheck:migrations origin/stagingpassesChecklist