Skip to content

Document new EXPLAIN flag for lookup joins #5779

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

Merged
merged 1 commit into from
Nov 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions v19.2/explain.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ WHERE e.season = '1'
ORDER BY e.stardate ASC;
~~~

<span class="version-tag">New in v19.2:</span>: The output of [`EXPLAIN`](explain.html#verbose-option) has been updated to show whether `equality cols are key` for [lookup joins](joins.html#lookup-joins), which means that the lookup columns form a key in the target table such that each lookup has at most one result.

~~~
tree | field | description | columns | ordering
+--------------------------+-----------------------+---------------------------+-----------------------------------------------------------------------------------------+-----------+
Expand Down
2 changes: 2 additions & 0 deletions v19.2/joins.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ Lookup joins are performed on two tables as follows:

You can override the use of lookup joins using [join hints](cost-based-optimizer.html#join-hints).

<span class="version-tag">New in v19.2:</span>: The output of [`EXPLAIN`](explain.html#verbose-option) has been updated to show whether `equality cols are key` for lookup joins, which means that the lookup columns form a key in the target table such that each lookup has at most one result.

## Performance best practices

{{site.data.alerts.callout_info}}CockroachDBs is currently undergoing major changes to evolve and improve the performance of queries using joins. The restrictions and workarounds listed in this section will be lifted or made unnecessary over time.{{site.data.alerts.end}}
Expand Down