Skip to content

sp_BlitzIndex: add support for 2025's JSON indexes #3736

@BrentOzar

Description

@BrentOzar

Is your feature request related to a problem? Please describe.
SQL Server 2025's new native JSON indexes don't show up as indexes in sp_BlitzIndex's output.

Note to self: here's how to see them:

SELECT ao.name AS json_index_object_name, ao.object_id, ps.*
FROM sys.all_objects ao WITH (NOLOCK)
LEFT OUTER JOIN sys.dm_db_partition_stats ps WITH (NOLOCK) ON ao.object_id = ps.object_id
WHERE OBJECT_NAME(ao.parent_object_id) = N'Users_JSON_Indexed'
  AND ao.name LIKE N'json_index_%'

The kinda-sketchy thing is that the JSON index seems to show up as at least 2 indexes - an index id 1 (which is usually the clustered index of an object), plus an index id 2 (which would normally be nonclustered). I'll need to do more testing to see if it's always like that.

Describe the solution you'd like
A few things to consider:

  • Show them in the table-level output (including size, creation statement, drop statement, etc) - and it may make sense to do this for the history tables of temporal tables, too
  • Show them in modes 0, 2

Are you ready to build the code for the feature?
Not yet. Filing this as a known issue for now, will circle back after 2025's official release to see the final behavior.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions