PostgreSQL's extended statistics — CREATE STATISTICS, pgstatisticext, pgstatisticextdata — the 4 stat kinds (dependencies / ndistinct / mcv / expressions) that help the planner handle correlated columns, multi-column NDVs, and expression cardinality. Covers src/backend/statistics/extendedstats.c + dependencies.c + mcv.c + mvdistinct.c. Loads when the user asks about extended stats syntax, when to CREATE STATISTICS, why a query has bad estimates on correlated columns, ndistinct for GROUP BY estimation, MCV lists in the extended-stats context, or the planner's clauselistselectivityext selectivity path. Skip when the ask is about pgstatistic (single-column stats — the sibling; see analyze-block-and-reservoir-sampling idiom) or about ANALYZE mechanics (that's analyze.c — different code path).
Install with
Claude CodeCodexCursorGitHub CopilotGemini CLI
Supported by the Atlas install prompt. Skill-specific requirements vary.
Skill stats
Skills1CategoryScience & researchStars0
About this skill
PostgreSQL's extended statistics — CREATE STATISTICS, pgstatisticext, pgstatisticextdata — the 4 stat kinds (dependencies / ndistinct / mcv / expressions) that help the planner handle correlated columns, multi-column NDVs, and expression cardinality. Covers src/backend/statistics/extendedstats.c + dependencies.c + mcv.c + mvdistinct.c. Loads when the user asks about extended stats syntax, when to CREATE STATISTICS, why a query has bad estimates on correlated columns, ndistinct for GROUP BY estimation, MCV lists in the extended-stats context, or the planner's clauselistselectivityext selectivity path. Skip when the ask is about pgstatistic (single-column stats — the sibling; see analyze-block-and-reservoir-sampling idiom) or about ANALYZE mechanics (that's analyze.c — different code path).
Quick start
Copy the install prompt. Use the green button above this README.
Send it to your agent. Paste it into your coding agent’s chat and send.
Review the setup. Your agent checks the skill’s instructions, requirements, and installation scope.
PostgreSQL's extended statistics — `CREATE STATISTICS`, `pg_statistic_ext`, `pg_statistic_ext_data` — the 4 stat kinds (dependencies / ndistinct / mcv / expressions) that help the planner handle correlated columns, multi-column NDVs, and expression cardinality. Covers `src/backend/statistics/extended_stats.c` + `dependencies.c` + `mcv.c` + `mvdistinct.c`. Loads when the user asks about extended stats syntax, when to `CREATE STATISTICS`, why a query has bad estimates on correlated columns, ndistinct for GROUP BY estimation, MCV lists in the extended-stats context, or the planner's `clauselist_selectivity_ext` selectivity path. Skip when the ask is about `pg_statistic` (single-column stats — the sibling; see `analyze-block-and-reservoir-sampling` idiom) or about ANALYZE mechanics (that's `analyze.c` — different code path).
About this listing
Category
Science & research
Reported license
PostgreSQL
Listing language (estimated)
English
Review status
Not individually reviewed
Agent compatibility
Atlas installation supports Claude Code, Codex, and Cursor. Skill-specific dependencies and features are checked during setup.