Skip to content

Diag: repro-builder result set — reconstruct regressed queries after stats updates #619

Description

@nanoDBA

Feature

An ExpertMode diagnostic result set that reconstructs a runnable repro for queries that regressed after a statistics update: for each regressed Query Store plan on a table whose stats a run updated, mine the sniffed parameter values from the plan XML ParameterList, replay the plan's set_options bitmask as SET statements, and emit a ready-to-run sp_executesql block plus a warnings taxonomy (missing temp objects, scoped credentials, etc.).

This turns "query X got slower after the stats run" from an accusation into a testable artifact.

Pattern source: sp_QueryReproBuilder (DarlingData) — three of its blocks (parameter mining, set_options fidelity, statement assembly) are self-contained and portable.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    diagnosticDiagnostic output, trending, observability improvementsenhancementNew feature or requestp3-nice-to-haveLow-impact enhancement or minor improvementquery-storeQuery Store integration, forced plans, or QS-related logic

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions