#3318·spicedb

Examine custom statistics as an optimization for Postgres and CRDB

Author: tstirrat15Created Sep 16, 2026Updated Sep 22, 2026

Extended statistics can be used to tell postgres to look at multiple columns together and collect correlations between them, which can help it understand how selective a combination of columns would be. it'd be useful for namespace/relation/subject relation columns, since those are correlated structurally.

It looks like cockroach has a CREATE STATISTICS as well.

If this is something that doesn't carry a big runtime cost but can help insure against index misses it's probably worth doing.