logoalt Hacker News

tracker1last Friday at 3:52 PM2 repliesview on HN

As others mention, you can create indexes directly against the json without projecting in to a computed column... though the computed column has the added benefit of making certain queries easier.

That said, this is pretty much what you have to do with MS-SQL's limited support for JSON before 2025 (v17). Glad I double checked, since I wasn't even aware they had added the JSON type to 2025.


Replies

advisedwanglast Friday at 6:10 PM

Exclusively using computed columns, and never directly querying the JSON does have the advantage of making it impossible to accidentally write a unindexed query.

selimthegrimlast Saturday at 12:59 AM

I did hear about it at a local DBA conference but didn't think it was a big deal