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

sql: avoid materializing all rows from a subquery into a tuple #64692

Open
yuzefovich opened this issue May 4, 2021 · 1 comment
Open

sql: avoid materializing all rows from a subquery into a tuple #64692

yuzefovich opened this issue May 4, 2021 · 1 comment
Labels
C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior. T-sql-queries SQL Queries Team
Projects

Comments

@yuzefovich
Copy link
Member

yuzefovich commented May 4, 2021

Depending on the execution mode of the subquery, we might be materializing all rows (which can be arbitrary large number in general case) into a single tuple to be stored as a single tree.Datum. This is suboptimal, and we should find a way to avoid this materialization. See #64464 for an example of OOM caused by this behavior.

Jira issue: CRDB-7208

@yuzefovich yuzefovich added the C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior. label May 4, 2021
@yuzefovich yuzefovich added this to Triage in SQL Queries via automation May 4, 2021
@yuzefovich yuzefovich moved this from Triage to Backlog in SQL Queries May 4, 2021
@jlinder jlinder added the T-sql-queries SQL Queries Team label Jun 16, 2021
@mgartner mgartner moved this from Backlog to New Backlog in SQL Queries Feb 16, 2023
@github-actions
Copy link

We have marked this issue as stale because it has been inactive for
18 months. If this issue is still relevant, removing the stale label
or adding a comment will keep it active. Otherwise, we'll close it in
10 days to keep the issue queue tidy. Thank you for your contribution
to CockroachDB!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior. T-sql-queries SQL Queries Team
Projects
Status: Backlog
SQL Queries
New Backlog
Development

No branches or pull requests

2 participants