Skip to content

sp_PerfCheck Phase 1: cut noise, flag bad config not changed config - #836

Merged
erikdarlingdata merged 1 commit into
devfrom
perfcheck/phase1-cut-noise
Jul 18, 2026
Merged

sp_PerfCheck Phase 1: cut noise, flag bad config not changed config#836
erikdarlingdata merged 1 commit into
devfrom
perfcheck/phase1-cut-noise

Conversation

@erikdarlingdata

Copy link
Copy Markdown
Owner

First pass of making sp_PerfCheck actually useful: kill the checklist noise and invert the backwards config logic. On a normal server this takes a 27-finding run down to 10, all meaningful.

Deleted (none indicate a problem)

  • 7005 ANSI Settings Require Review — fired on every database; session SET options are what matter, not database-level ANSI flags
  • 7007 Non-Default Target Recovery Time
  • 4107 Resource Governor Enabled (bare informational)
  • 1000 generic Non-Default Configuration — flagged correct MAXDOP/CTFP/max-memory as findings

Inverted

  • 1004 cost threshold now flags the bad value: fires under 50, High at/below the default of 5, Low between 6 and 49.

Kept

  • 7103 (log growth ≠ 64 MB) — a real SQL 2022 instant-file-init check.

Harness

Reworked the config test for the inverted CTFP semantics (absent when sane, present + High at default, present + Low when 6–49), bidirectional with restore. 39/39 local; compiles on all five versions.

🤖 Generated with Claude Code

The check set drowned real findings in priority-50 checklist noise and had
some logic backwards. On a normal server this cut a 27-finding run to 10,
all meaningful.

Deleted, none of which indicate a problem:
- 7005 ANSI Settings Require Review (fired on every database; the SESSION
  SET options the driver sends are what matter, not database-level ANSI)
- 7007 Non-Default Target Recovery Time
- 4107 Resource Governor Enabled (bare "it is on" informational)
- 1000 Non-Default Configuration, the generic "changed from default" list --
  it flagged correct MAXDOP / cost threshold / max memory values as findings

Inverted the cost-threshold check (1004) to flag the BAD value instead of the
changed one: it now fires when CTFP is under 50, escalating to High (20) at or
below the terrible default of 5 and staying Low (40) between 6 and 49.

Kept 7103 (log growth <> 64 MB) -- it looks like a nitpick but is a real SQL
2022 check: log auto-growth only gets instant file initialization at 64 MB.

Reworked the harness config test to match: it now forces CTFP sane / default /
low and asserts absence, presence, and the priority escalation bidirectionally.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@erikdarlingdata
erikdarlingdata merged commit 5223fee into dev Jul 18, 2026
5 checks passed
@erikdarlingdata
erikdarlingdata deleted the perfcheck/phase1-cut-noise branch July 18, 2026 13:33
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.

1 participant