One of the available algorithms to join two tables together in SQL Server is Nested Loops. The nested loops join uses one join input as the outer input table and one as the inner input table. The outer loop iterates the outer input table row by row. The inner loop, executed for each outer row, searches for matching rows in the inner input table.
This article is an introduction to the query hint overview that appeared in SQL Server 2016 SP1.
There are many different thoughts on using hints in queries: some people say that you should never use them, while others insist on using hints if anything works incorrectly.
This article is the second one of the three articles devoted to a particular security configuration combination of database security.
In my previous article, I presented a scenario in which we were able to compromise data in a SQL Server database.
I would like to note that the knowledge of this configuration combination is critical. In this article, I am going to provide further information and reasons for the importance of this issue. Read More
JSON is one of the most widely used data interchange formats. It is used as a storing format in several NoSQL solutions, in particular, in Microsoft Azure DocumentDB. In my opinion, today JSON is yet more popular than XML. One of the reasons of its popularity is more simple form and better readability in comparison with XML. Naturally, there was a long-standing need in having an option to process data in this format within SQL Server. In SQL Server 2016, this option has been established. Read More
In this article, we are going to talk about using the nvarchar data type. We will explore how SQL Server stores this data type on the disk and how it is processed in the RAM. We will also examine how the size of nvarchar may affect performance.
Actual data size: nchar vs nvarchar
We use nvarchar when the size of column data entries are probably going to vary considerably. The storage size (in bytes) is twice as much the actual length of data entered + 2 bytes. This allows us to save disk storage in comparison of using nchar data type. Let us consider following example. We are creating two tables. One table contains nvarchar column, another table contains nchar columns. The size of the column is 2000 characters (4000 bytes).