Skip to content

docs(sql): the 65,536 subquery bound is fixed, and how it fails - #452

Merged
fupelaqu merged 1 commit into
mainfrom
docs/subquery-value-bound
Oct 27, 2026
Merged

fupelaqu merged 1 commit into
mainfrom
docs/subquery-value-bound

Conversation

@fupelaqu

Copy link
Copy Markdown
Contributor

What

The docs describe the bound on an uncorrelated WHERE subquery as measured on the released 0.24.0 engine against Elasticsearch 8.18.3:

  • The bound is a fixed 65,536 distinct values. It is the default of index.max_terms_count, but raising that setting does not lift it. The reference used to advise raising the setting.
  • Past it, a default cluster fails with Elasticsearch's own too many buckets error, which names the 65,536 limit. The engine's own message, which suggests the JOIN rewrite, does not appear there, so the limitations page no longer promises it. The statement still fails loudly and is never truncated.
  • The advice: narrow the inner query, or rewrite the statement as a JOIN.

Documentation only.

🤖 Generated with Claude Code

The bound on an uncorrelated subquery's values is a fixed 65,536: raising
index.max_terms_count does not lift it. Past it, a default cluster fails with
Elasticsearch's own too-many-buckets error (measured on 8.18.3 with 0.24.0),
loudly and never truncated. The advice is to narrow the inner query or rewrite
the statement as a JOIN.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fupelaqu
fupelaqu marked this pull request as ready for review October 27, 2026 18:19
@fupelaqu
fupelaqu merged commit 10a1502 into main Oct 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant