Skip to content

Document Dolt statistics system variables and tidy the stats docs #80

Description

@tbantle22

Follow-up from the source-vs-docs cross-check (#64). The statistics surface is only partially documented, and what exists is scattered.

Current state

  • ✅ The dolt_statistics system table is documented in dolt-system-tables.md (it's the only stats table).
  • ✅ Eight dolt_stats_* procedures (flush, gc, info, once, purge, restart, stop, wait) are documented in dolt-sql-procedures.md.
  • 🟠 Stats system variables are only mentioned in passing in sql-support/miscellaneous.md — no per-variable sections in dolt-sysvars.md, and at least one name there is stale.

Gaps to close

1. Stats system variables → proper sections in dolt-sysvars.md. These are registered in dsess/variables.go / sqle/system_variables.go but have no entry in dolt-sysvars.md:

  • dolt_stats_enabled
  • dolt_stats_paused
  • dolt_stats_memory_only
  • dolt_stats_branches
  • dolt_stats_job_interval
  • dolt_stats_gc_enabled
  • dolt_stats_gc_interval

Each needs the standard section (description, scope, default, accepted values). A "Statistics variables" subsection in dolt-sysvars.md probably makes sense, with the index (sql-extensions.md) updated to point at the new anchors instead of the current miscellaneous.md ones.

2. dolt_stats_timers procedure is registered in dprocedures/init.go but undocumented — add it to dolt-sql-procedures.md (or confirm it's internal-only and intentionally omit, as we did with dolt_storage_format).

3. Stale reference: miscellaneous.md mentions dolt_stats_auto_refresh_enabled as the "up to 1.50.x" name. Once the variables are documented properly, reconcile/clean up that section so it points at the canonical docs rather than restating settings inline.

Out of scope / tracked elsewhere

Surfaced during the cross-check for #43 (see #64).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions