Skip to content

Drop the index hint from the auto-postpone sweep#2973

Merged
jorgemanrubia merged 1 commit into
mainfrom
entropy-sweep-drop-index-hint
Jul 9, 2026
Merged

Drop the index hint from the auto-postpone sweep#2973
jorgemanrubia merged 1 commit into
mainfrom
entropy-sweep-drop-index-hint

Conversation

@jorgemanrubia

Copy link
Copy Markdown
Member

Removes the use_index pin from Card::Entropic.auto_postpone_all_due, keeping the (account_id, board_id, status) index added in #2970.

Once MySQL collected statistics on the new index, the planner started choosing it for the sweep on its own. The forced pin is no longer needed and is better left to the planner, which can adapt per-account as data shifts — a background sweep doesn't warrant a hardcoded plan.

The index stays; only the hint is removed.

Copilot AI review requested due to automatic review settings July 9, 2026 18:19

Copilot AI left a comment

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.

Pull request overview

Removes the forced MySQL optimizer index hint from the hourly card auto-postpone (entropy) sweep, relying on the optimizer to choose the appropriate plan now that statistics for the (account_id, board_id, status) index have stabilized. This keeps the underlying index (added in #2970) while reducing hardcoded query-plan coupling in background processing.

Changes:

  • Removes the .use_index(:index_cards_on_account_id_and_board_id_and_status) hint from Card::Entropic.auto_postpone_all_due.
  • Removes the now-obsolete explanatory comment describing why the hint was pinned.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jorgemanrubia jorgemanrubia merged commit de5c293 into main Jul 9, 2026
14 checks passed
@jorgemanrubia jorgemanrubia deleted the entropy-sweep-drop-index-hint branch July 9, 2026 18:23
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.

2 participants