Performance: Indexing JSON in SQL Server
Continuing the JSON in SQL Server posts found here and here , a co-worker asked the interesting question "can you index the key values in a small SQL Server text column using JSON?" I didn't know the answer to that, so here we go. Setup The test box remains the same: Core i7 CPU, 16 GB RAM, 1 TB 7200 RPM data disk. SQL Server 2019. The DicomFile table had a new column added, populated from the indexed SQL columns, and a new nonclustered index added. alter table DicomFile add IndexedJson varchar(1000); go update DicomFile set IndexedJson = concat('{' , '"SopClassUid": "', SopClassUid, '",' , '"SopInstanceUid": "', SopInstanceUid, '",' , '"PatientId": "', PatientId, '",' , '"StudyInstanceUid": "', StudyInstanceUid, '",' , '"SeriesInstanceUid": "', SeriesInsta...