-
Notifications
You must be signed in to change notification settings - Fork 477
Partial statistics docs and settings #22087
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for cockroachdb-api-docs canceled.
|
✅ Deploy Preview for cockroachdb-interactivetutorials-docs canceled.
|
38dbdab to
f0b9359
Compare
❌ Deploy Preview for cockroachdb-docs failed. Why did it fail? →
|
✅ Netlify Preview
To edit notification comments on pull requests, go to your Netlify project configuration. |
8cf6c99 to
c477e0e
Compare
rytaft
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks for all this work! Just a few comments.
| CREATE INDEX ON rides (start_time); | ||
| ~~~ | ||
|
|
||
| Partial statistics are particularly valuable for timestamp columns where workloads commonly access the most recent data: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the WHERE clause, you can specify arbitrary predicates, so the "recency" argument isn't needed here (unlike for USING EXTREMES). Any range of values that was recently updated (even in the middle of the index) can have partial stats collected here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated example!
2fbb646 to
6ece21c
Compare
|
@rytaft TFTR and sorry I took a while to get back to this! I revised per your feedback; could you please have another look? |
DOC-14809
DOC-11635
DOC-10969
DOC-10915
DOC-12760
Improve our partial statistics docs as follows:
CREATE STATISTICSpageThese updates apply to 23.2-26.1, according to the following feature timeline (please call out if incorrect):
enable_create_stats_using_extremes= off (session)USING EXTREMESenabled by defaultenable_create_stats_using_extremes= on (session);optimizer_use_merged_partial_statistics= off (session)sql.stats.automatic_partial_collection.enabled= true;sql.stats.automatic_partial_collection.min_stale_rows= 100;sql.stats.automatic_partial_collection.fraction_stale_rows= 0.05; table-level equivalentsoptimizer_use_merged_partial_statistics= on;sql.stats.automatic_partial_collection.enabled= true;sql.stats.automatic_full_collection.enabled= true; table-level equivalentsWHERE)WHEREDocs to review (v26.1; please use the version dropdown menu to change versions):
CREATE STATISTICS