Open mgartner opened 1 year ago
(See also #72418 and #71828 regarding configuring number of histogram buckets differently for large tables.)
[becca] perhaps we'd introduce "max stale rows" setting.
@michae2 can you add a link in the JIRA ticket to the post-mortem document related to this issue?
I'm going to remove the postmortem label since I think we've talked about a number of different stats improvements that might have helped this customer, and I'm not convinced that this is the one we should prioritize.
I'd argue that this is something we should absolutely prioritize. Any customer with large tables (let's say 100+ million rows), is doomed to have extremely stale stats as a result of these defaults. Of course, this wouldn't be a magic fix for all stats related issues, but it's a relatively simple change that provides incremental benefits. If we're unwilling to change defaults, or scale them based on the size of the table, then at the very least I think we need to increase awareness about this pitfall through documentation, blog posts, etc.
Ok fair enough! Added the label back. I just want to make sure that everything with this label is definitely something we are planning to do sooner rather than later, it's scoped and specific, and we have high confidence it will help the underlying issue.
Makes sense. Let's leave the label for now so we can locate this easily for 23.2 planning. During planning we can refine this issue to make it scoped and specific.
Copied from https://github.com/cockroachdb/cockroach/issues/64570#issuecomment-884362488:
We now have per-table autostats collection settings so that users can make auto-stats collection more regular for ever-growing tables:
However, we still receive a lot of inquiries that have this same root cause. We should consider do some of the following:
sql_stats_automatic_collection_fraction_stale_rows
andsql_stats_automatic_collection_min_stale_rows
and provides guidance on how they should be set for larger tables.Jira issue: CRDB-23054