Skip to content

Commit

Permalink
Add known limit on locality optimized search
Browse files Browse the repository at this point in the history
Fixes #12175
  • Loading branch information
rmloveland committed Nov 11, 2021
1 parent e973a08 commit a87c531
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% if page.name == "cost-based-optimizer.md" %} Locality-optimized search {% else %} [Locality-optimized search](cost-based-optimizer.html#locality-optimized-search-in-multi-region-clusters) {% endif %} only works for queries selecting a limited number of records (up to 100,000 unique keys). Also, It does not yet work with [`LIMIT`](limit-offset.html) clauses.

[Tracking GitHub Issue](https://github.com/cockroachdb/cockroach/issues/64862)
4 changes: 4 additions & 0 deletions v21.2/cost-based-optimizer.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ This can lead to increased performance in multi-region deployments, since it mea
The asynchronous parallel lookup behavior described above does not occur if you [disable vectorized execution](vectorized-execution.html#configuring-vectorized-execution).
{{site.data.alerts.end}}

Note the following limitations:

{% include {{ page.version.version }}/sql/locality-optimized-search-limited-records.md %}

## Query plan cache

CockroachDB uses a cache for the query plans generated by the optimizer. This can lead to faster query execution since the database can reuse a query plan that was previously calculated, rather than computing a new plan each time a query is executed.
Expand Down
4 changes: 4 additions & 0 deletions v21.2/known-limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ UNION ALL SELECT * FROM t1 LEFT JOIN t2 ON st_contains(t1.geom, t2.geom) AND t2.

{% include {{page.version.version}}/sql/jsonb-comparison.md %}

### Locality-optimized search only works for queries selecting a limited number of records

{% include {{ page.version.version }}/sql/locality-optimized-search-limited-records.md %}

## Unresolved limitations

### Optimizer stale statistics deletion when columns are dropped
Expand Down

0 comments on commit a87c531

Please sign in to comment.