Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 621b147

Browse files
Added JSON best practices
1 parent e03fd19 commit 621b147

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

‎docs/findings/CurrentHighCheckId.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ layout: default
1010

1111
If you want to add a new check, use this number then add +1 for the next one.
1212

13-
**Next Check Id:** 159
13+
**Next Check Id:** 161
1414

1515
[Back to top](#top)
1616

‎docs/findings/SQLCodeDevelopment.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2614,6 +2614,33 @@ Try running EXEC sp_refreshsqlmodule or sp_refreshview.
26142614

26152615
[Back to top](#top)
26162616

2617+
---
2618+
2619+
<a name="159"/>
2620+
2621+
## JSON Explicit Schema
2622+
**Check Id:** 159 [Not implemented yet. Click here to add the issue if you want to develop and create a pull request.](https://github.com/EmergentSoftware/SQL-Server-Development-Assessment/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=JSON+Explicit+Schema)
2623+
2624+
Explicitly defining the schema JSON columns using [with_clause](https://learn.microsoft.com/en-us/sql/t-sql/functions/openjson-transact-sql?view=sql-server-ver16#with_clause) is more performant.
2625+
2626+
If you are required to use JSON string in the relational database and need to frequent parse the JSON string, you could create a computed column using `JSON_VALUE(expression, path)` and create an index
2627+
2628+
- See: [JSON_VALUE (Transact-SQL)](https://learn.microsoft.com/en-us/sql/t-sql/functions/json-value-transact-sql?view=sql-server-ver16)
2629+
2630+
[Back to top](#top)
2631+
2632+
---
2633+
<a name="160"/>
2634+
2635+
## JSON Performance
2636+
**Check Id:** 160 [Not implemented yet. Click here to add the issue if you want to develop and create a pull request.](https://github.com/EmergentSoftware/SQL-Server-Development-Assessment/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=JSON+Performance)
2637+
2638+
If you are required to use JSON strings in the relational database and need to frequent parse the JSON string, create a computed column on the table using `JSON_VALUE(expression, path)` and create an index
2639+
2640+
- See: [JSON_VALUE (Transact-SQL)](https://learn.microsoft.com/en-us/sql/t-sql/functions/json-value-transact-sql?view=sql-server-ver16)
2641+
2642+
[Back to top](#top)
2643+
26172644
---
26182645
<br>
26192646
<br>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /