Performance considerations

One of the main concerns about JSON in SQL Server 2016 is performance. As mentioned, unlike XML, JSON is not fully supported; there is no JSON data type. Data in XML columns is stored as binary large objects (BLOBs). SQL Server supports two types of XML indexes that avoid parsing the whole data at runtime to evaluate a query and allow efficient query processing. Without an index, these BLOBs are shredded at runtime to evaluate a query. As mentioned several times, there is no JSON data type; JSON is stored as simple Unicode text and the text has to be interpreted at runtime to evaluate a JSON query. This can lead to slow reading and writing performance for large JSON documents. The primary XML index indexes all tags, ...

Get SQL Server 2016 Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.