Skip to content
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

Clean up optimization docs & add syntactic join ordering section #13608

Merged
merged 3 commits into from
Oct 17, 2022

Conversation

colebow
Copy link
Member

@colebow colebow commented Aug 10, 2022

Description

Improvements to optimization docs (formatting & grammar), then adding a new section on how to best optimize for syntactic join ordering.

Is this change a fix, improvement, new feature, refactoring, or other?

Improvement

Is this a change to the core query engine, a connector, client library, or the SPI interfaces? (be specific)

Docs

Documentation

( ) No documentation is needed.
(x) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.

Release notes

(x) No release notes entries required.
( ) Release notes entries required with the following suggested text:

@cla-bot cla-bot bot added the cla-signed label Aug 10, 2022
@github-actions github-actions bot added the docs label Aug 10, 2022
@colebow colebow requested review from mosabua and losipiuk August 10, 2022 23:34
@colebow colebow marked this pull request as ready for review August 10, 2022 23:35
@colebow colebow requested a review from jhlodin August 11, 2022 15:50
@colebow colebow force-pushed the colebow/optimization-docs branch 3 times, most recently from e9f714f to a909a81 Compare August 11, 2022 17:29
Copy link
Contributor

@jhlodin jhlodin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One change, otherwise LGTM

@colebow colebow force-pushed the colebow/optimization-docs branch from a909a81 to 7b964ad Compare August 11, 2022 17:42
If using ``AUTOMATIC`` and statistics are not available, or if for any other
reason a cost could not be computed, the ``ELIMINATE_CROSS_JOINS`` strategy is
used instead.
If you are using ``AUTOMATIC`` join enumeration and statistics are not
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the properties reference docs for this property link to here ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like there is no link to this from properties-optimizer.rst .. we should add that

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping @colebow

@colebow colebow force-pushed the colebow/optimization-docs branch from 7b964ad to 50aff3c Compare August 17, 2022 18:42
@colebow colebow force-pushed the colebow/optimization-docs branch 4 times, most recently from aea1d2a to 077f498 Compare September 20, 2022 18:41
@colebow colebow requested a review from mosabua September 20, 2022 18:41
Copy link
Member

@mosabua mosabua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only minor changes needed.

@colebow colebow force-pushed the colebow/optimization-docs branch from 077f498 to cfa4a7e Compare September 21, 2022 19:06
@colebow colebow requested a review from mosabua September 27, 2022 13:53
If using ``AUTOMATIC`` and statistics are not available, or if for any other
reason a cost could not be computed, the ``ELIMINATE_CROSS_JOINS`` strategy is
used instead.
If you are using ``AUTOMATIC`` join enumeration and statistics are not
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

If using ``AUTOMATIC`` and statistics are not available, or if for any other
reason a cost could not be computed, the ``ELIMINATE_CROSS_JOINS`` strategy is
used instead.
If you are using ``AUTOMATIC`` join enumeration and statistics are not
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like there is no link to this from properties-optimizer.rst .. we should add that

The join distribution type is automatically chosen when the join reordering
strategy is set to ``AUTOMATIC`` or when the join distribution type is set to
``AUTOMATIC``. In both cases, it is possible to cap the maximum size of the
replicated table with the ``join-max-broadcast-table-size`` configuration
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add this properties to properties-optimizer.rst .. even if just a small section with link to here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping @colebow

Copy link
Member

@losipiuk losipiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo comment on Syntactic join order. Not sure if that is a big deal, do we want to be super precise or just give readers some hint on how execution follows?

@colebow colebow force-pushed the colebow/optimization-docs branch from cfa4a7e to a402307 Compare October 5, 2022 16:25
@colebow
Copy link
Member Author

colebow commented Oct 5, 2022

LGTM modulo comment on Syntactic join order. Not sure if that is a big deal, do we want to be super precise or just give readers some hint on how execution follows?

I've added a line which suggests it. I think if a user isn't savvy enough to understand without an explicit example of that, we probably don't need them trying to go crazy with this.

@colebow colebow requested a review from losipiuk October 7, 2022 16:38
@losipiuk
Copy link
Member

LGTM. @mosabua are there some changes here you want to be addressed or should I merge already?

@colebow
Copy link
Member Author

colebow commented Oct 10, 2022

LGTM. @mosabua are there some changes here you want to be addressed or should I merge already?

I'm personally leaving those to a different PR because I think addressing different files which link to here is outside the scope of this PR/change.

@mosabua
Copy link
Member

mosabua commented Oct 11, 2022

Lets merge this. @colebow can follow up.

@colebow colebow requested a review from losipiuk October 14, 2022 16:37
@losipiuk losipiuk merged commit 9da2a42 into trinodb:master Oct 17, 2022
@github-actions github-actions bot added this to the 401 milestone Oct 17, 2022
@colebow colebow deleted the colebow/optimization-docs branch October 27, 2022 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants