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

opt: support locality optimized search for scans with more than 1 row #11615

Closed
jseldess opened this issue Sep 8, 2021 · 3 comments
Closed

Comments

@jseldess
Copy link
Contributor

jseldess commented Sep 8, 2021

Jesse Seldess (jseldess) commented:

PR: cockroachdb/cockroach#69395

From release notes:

Locality-optimized search is now supported for scans that are guaranteed to return 100,000 keys or less. This optimization allows the execution engine to avoid visiting remote regions if all requested keys are found in the local region, thus reducing the latency of the query. [#69395][#69395]

Jira Issue: DOC-1313

@jseldess jseldess added this to the 21.2 milestone Sep 8, 2021
@rmloveland rmloveland self-assigned this Sep 13, 2021
@exalate-issue-sync exalate-issue-sync bot assigned ghost and unassigned rmloveland Dec 15, 2021
@exalate-issue-sync
Copy link

Vy Ton (vy-ton) commented:
Stephanie Bodoff We no longer have a dedicated multi-region virtual team, so we are working on aligning multi-region pieces with the correct product area. This would go to SQL Queries, therefore I’m replacing Richard Loveland with you.

Richard Loveland noted this might be documented already

@exalate-issue-sync
Copy link

exalate-issue-sync bot commented Jan 10, 2022

Stephanie Bodoff (stbof) commented:
@rytaft I'm a little confused by this improvement. Here it appears as a positive. However, this limitation spins it as negative: cockroachdb/cockroach#64862 (comment)

What am I missing?

@rytaft
Copy link
Contributor

rytaft commented Jan 11, 2022

Hi @stbof -- it's a bit confusing since there are two parts to the issue and I only fixed one of them. I added support for locality optimized search for scans with more than one row, when the number of rows can be determined because a unique column (or set of unique columns) in the scan is limited to a specified number of values. For example, SELECT * FROM tab WHERE pk IN (1, 3, 5), where tab is a REGIONAL BY ROW table, and pk is the primary key.

What is still outstanding is support for the case when the number of rows can be determined based on a limit. For example, we do not yet support locality optimized search for SELECT * FROM tab LIMIT 3 where tab is a REGIONAL BY ROW table.

Does this help clarify?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants