Commit Graph

1 Commits

Author SHA1 Message Date
Alex Vandiver
aebc9081b8 migrations: Generate statistics for subject vs channel-messages.
These extended statistics allow the query planner to know that the
prevalence of empty topics is very different in DMs, as opposed to
channel messages.  The `ALTER STATISTICS` adjusts the size of the
"most common value" list -- it must be large enough to include the
empty-topic channel messages to be fully effective.  Having this list
be over-large does not carry much risk, however.

The `ANALYZE zerver_message` step may be quite slow.
2025-03-19 09:39:20 -07:00