Skip to content

Don't defer any index creations during materialization - #8023

Open
labkey-jeckels wants to merge 3 commits into
release26.7-SNAPSHOTfrom
26.7_fb_noDeferredIndex
Open

Don't defer any index creations during materialization#8023
labkey-jeckels wants to merge 3 commits into
release26.7-SNAPSHOTfrom
26.7_fb_noDeferredIndex

Conversation

@labkey-jeckels

@labkey-jeckels labkey-jeckels commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Rationale

TeamCity has seen intermittent failures on the optimization work, seemingly related to samples being inserted but not showing up (or perhaps just not yet) in the materialized table.

The deferred index creation may be a contributing factor.

Changes

  • Switch back to creating all indices before considering the materialized table ready for use

Tasks

  • Claude Code Review
  • Revamping and retargeting
  • Manual Testing
  • Test Automation - N/A

.addIndex("CREATE INDEX idx_${NAME}_root ON temp.${NAME} (rootmaterialrowid)")
// Deferred despite being UNIQUE. Source data guarantees uniqueness, and this is very expensive to build
.addDeferredIndex("CREATE UNIQUE INDEX uq_${NAME}_lsid ON temp.${NAME} (lsid)");
.addIndex("CREATE UNIQUE INDEX uq_${NAME}_lsid ON temp.${NAME} (lsid)");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The comment for this line is now incorrect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants