-
Notifications
You must be signed in to change notification settings - Fork 469
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
document generic query plans #18753
document generic query plans #18753
Conversation
Files changed:
|
✅ Deploy Preview for cockroachdb-interactivetutorials-docs canceled.
|
✅ Deploy Preview for cockroachdb-api-docs canceled.
|
✅ Netlify Preview
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Very nice! I left a few suggestions inline.
We might also want to cal lout that you'll only get the benefits of generic query plans if you're using prepared statements, either with an explicit PREPARE
statement, or with the extended query protocol (which many ORMs and clients will use automaticall): https://www.postgresql.org/docs/current/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY
But we don't have any documentation on the extended query protocol, that I can find.
@mgartner TFTR! Is it a significant gap that we don't document the extended query protocol? Or would its meaning be clear enough if I say, e.g., EDIT: I sort of wrote around this. |
7ea49fd
to
9be05ca
Compare
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.
Looking good. Left a few more comments.
I do think we should call out that generic query plans come with a trade-off: the plans produced may be less efficient than a custom plan. For that reason, we should urge users to use plan_cache_mode=auto
instead of force_generic_plan
because under this setting the database should avoid bad generic query plans and fallback to custom plans.
@mgartner I made some adjustments based on your feedback - PTAL. |
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! as discussed in slack, we may want to link to the guidance on reorder_joins_limit where many-join queries are mentioned
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.
lgtm, non-blocking nits
5322c13
to
fad6076
Compare
* document generic query plans --------- Co-authored-by: Florence Morris <[email protected]>
* document generic query plans --------- Co-authored-by: Florence Morris <[email protected]>
DOC-10470