-
Notifications
You must be signed in to change notification settings - Fork 117
Introduce INDEX ON and vector index DDL
#3782
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
Open
hatyo
wants to merge
11
commits into
FoundationDB:main
Choose a base branch
from
hatyo:new-index-on-source-syntax
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+6,674
−334
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
921fb5c to
88d84f0
Compare
88d84f0 to
2d4fc70
Compare
9c0f6df to
79f6255
Compare
📊 Metrics Diff Analysis ReportSummary
ℹ️ About this analysisThis automated analysis compares query planner metrics between the base branch and this PR. It categorizes changes into:
The last category in particular may indicate planner regressions that should be investigated. New QueriesCount of new queries by file:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a new, more concise syntax, regarding the organization of index keys and values, for defining indexes in the relational layer: the
INDEX ONsyntax. This provides an alternative to the existingINDEX AS SELECT(materialized view) approach while producing semantically equivalent indexes and query plans. It also introduces new type of index, thevectorindex, which can be defined exclusively with the new index syntax.New Syntax
The
INDEX ONsyntax follows a more traditional SQL pattern:Examples
Regular value indexes:
Aggregate indexes:
Newly introduced vector indexes:
Comparison with INDEX AS SELECT
Both syntaxes are fully supported and produce equivalent indexes:
Both syntaxes leverage the same underlying
MaterializedViewIndexGenerator, ensuring identical index structures and storage layout, theINDEX ONsyntax relies onVIEWdefinition introduced in #3680 to determine the subset of data to be indexed.The choice of syntax is purely a matter of preference and familiarity for already supported index, however newly introduced indexes such as vector indexes will be made exclusively avaiable using the new
INDEX ONsyntax.This resolves #3786.