pg_learned_stats
alohadb · AlohaDB: Experimental learned cardinality estimates for the planner
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 102389 | pg_learned_stats | alohadb | 1.0 | STAT | MIT | SQL |
PostgreSQL · 18
Usage
Sources:
pg_learned_stats 1.0 provides experimental learned cardinality estimates for the planner. This preview module is scoped to the PostgreSQL 18 fork in AlohaDB 21.1.0; stock PostgreSQL compatibility is not established.
Workflow
Installation requires a superuser; function use also requires the appropriate object privileges.
Operational boundaries
Add pg_learned_stats to shared_preload_libraries and restart before using its functions. pg_learned_stats.enabled controls the hooks and pg_learned_stats.train_interval controls training; pg_learned_stats_train and pg_learned_stats_reset manage learned state. This module uses AlohaDB planner integration and shared memory. Rehearse plan changes on representative workloads; learned estimates do not guarantee better plans.
This module corresponds to the former upstream name alohadb_learned_stats. Follow AlohaDB’s cluster/object conversion procedure and do not substitute an unrelated implementation with a similar name. Rehearse dependencies, privileges and backup restoration before upgrades.