Skip to content

Add optional query text and plan collection flags (#337)#351

Merged
erikdarlingdata merged 1 commit intodevfrom
feature/optional-plan-collection
Feb 27, 2026
Merged

Add optional query text and plan collection flags (#337)#351
erikdarlingdata merged 1 commit intodevfrom
feature/optional-plan-collection

Conversation

@erikdarlingdata
Copy link
Owner

Summary

  • Adds collect_query and collect_plan bit columns to config.collection_schedule (NOT NULL, DEFAULT 1)
  • Users can set either flag to 0 per-collector to disable text/plan storage and reduce data volume
  • Collectors 08 (query_stats), 09 (query_store), 10 (procedure_stats) read the flags and return NULL when disabled
  • Includes idempotent ALTER TABLE with named constraints for existing installations

Test plan

  • Clean install on sql2016 — all 51 scripts pass, 46 collectors succeed
  • New columns default to 1 on all schedule rows
  • With defaults (1): query_text and query_plan_text populated correctly
  • With flags set to 0: query_text and query_plan_text are NULL in new rows

🤖 Generated with Claude Code

…337)

Adds collect_query and collect_plan bit columns to config.collection_schedule
(NOT NULL, DEFAULT 1) so users can disable text/plan storage per collector to
reduce data volume. Collectors 08, 09, 10 read the flags and return NULL when
disabled. Includes ALTER TABLE for existing installations. Clean install tested
on sql2016, verified flags work correctly (enabled: data collected, disabled:
NULLs stored).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit d101b1b into dev Feb 27, 2026
7 checks passed
@erikdarlingdata erikdarlingdata deleted the feature/optional-plan-collection branch February 27, 2026 23:01
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