Skip to content

SQL Server: Support JSON indexes #29623

@roji

Description

@roji

While it has been possible to create a computed column for accessing a property inside JSON and an index over that, SQL Server 2025 introduced a more first-class CREATE JSON INDEX that works with the new JSON data type (Documentation
):

CREATE JSON INDEX name ON table_name (json_column_name)
  [ FOR ( sql_json_path [ , ...n ] ) ]
  [ WITH ( <json_index_option> [ , ...n ] ) ]
  [ ON { filegroup_name | "default" } ]
[ ; ]

Note that the specifics of indexing JSON properties vary across databases, so this is for SQL Server specifically. If we add SQLite JSON support, we can also do this for SQLite at the same time, assuming it's supported.

This depends on #11336 for the metadata side.

PG issue: npgsql/efcore.pg#2568

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions