sql: create parallel lookup join hint to let people use the unsafe parallel lookup join when required #42708
Labels
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
E-quick-win
Likely to be a quick win for someone experienced.
T-sql-queries
SQL Queries Team
19.2 closed a critical stability bug that permitted lookup joins to use unlimited memory in certain cases, causing OOMs. Because of #19721, the way we had to close the bug was by banning parallel lookup joins unless the optimizer could prove that the joined relation only had one row per lookup.
This has the potential to erode performance from 19.1 baselines in cases that didn't suffer from potential OOM conditions, which is problematic. We need to restore the performance for cases where it matters for customers.
We need a hint that always turns on the parallel behavior, even if the optimizer can't prove that the join columns are a key. I propose the syntax:
SELECT * FROM t <join type> PARALLEL_LOOKUP JOIN u...
This syntax is deliberately ugly. We shouldn't document it, because it's unsafe, but I also don't think we need to stick
unsafe
into the name necessarily. We should remove this syntax in 20.1 once #19721 is resolved and lookup join no longer has this issue.Jira issue: CRDB-5332
The text was updated successfully, but these errors were encountered: