Log in | Register

SQL Server Blog - SQLServerGeeks.com SQL Server Blog - SQLServerGeeks.com



Resource Governor to Control Physical IO

Hi Friends,
Microsoft introduced so many new features and improvements with SQL Server 2014. These features make the life of DBA easier. In addition to these features, One of the improvement provided in SQL Server 2014 is about Resource Governor. Resource Governor is a well-known feature of the SQL Server world to manage the system resource consumption. […]

Sub Query behaviour looks like a bug

While debugging one procedure I came across below Scenario where a sub-query was returning all records from outer query.

Initially I thought it is a bug in SQL server. As COL1 column is not part of Table2 , it should fail binding stage and throw error. But it returned all 20 records from Table1. Though […]

AWS RDS for SQL Server – Cheat Sheet

Hello Friends!

Back to you again with my all together new pick, Amazon Relation Database Service. Ah! interest, some of you might be wondering is this topic has nothing to do with SQL Server. Yes / NO ?

Working with RDS for few years and most of cases got to know from many of beginners or intermediate […]

By |November 5th, 2016|Categories: SQL Server||0 Comments

SQL Server – Join Operation

In this blog we’ll find how SQL Server works when we do join operation. SQL Server optimizer chooses one of the below physical operator to perform logical join operation.

Hash Match
Merge Join
Nested Loop Join

As far as performance is concern let me tell you, we can’t say which one will best.Each operator has its own advantages […]

SQL Server 2016 – Batch Mode Processing with Serial Plan

Hello Friends,

There are lots of features and improvements announced by Microsoft in SQL Server 2016, one of them is providing batch mode processing with 900 rows batch size. SQL Server 2016 uses batch mode processing even if the execution plan is a serial plan which was not possible with previous versions. Due to this […]

Don’t use ISDATE() function to check valid Date

I got the below email from one of my teammate on ISDATE() function.

Thanks to him for asking me the question. I do not have any idea on this behaviour of  sql server. I gone through the MSDN documentation and  got to  know, why SQL Server behaves like this.

select ISDATE(’08/16/013′) returns true because here it […]

By |October 11th, 2016|Categories: SQL Server, Transact-SQL|Tags: , , , |0 Comments

SQL Server 2016 – Trace Flag 9453 – Disable Batch Mode Processing

Hello Friends,

In my previous blog post, we have seen the SQL Server 2016 Sort operator with batch mode processing. To compare the performance for Batch mode versus Row mode for Sort operator, I used a trace flag 9347 which disables the batch mode processing for sort operator. Now the question is: Is there any […]

How to redefine the returning result sets of a stored procedure?

This feature was introduced in SQL Server 2012. Using With Result Sets option with Execute Command we can change the column name and data type of returning result set.

(2 row(s) affected) 
ID          Name       DOB 
———– ———- ———————– 
1           A          1980-04-10 06:09:00.100 
1           B          1982-03-08 03:42:41.003
(2 row(s) affected)
MyID                 MyName  DateOfBirth 
——————– ——- ———– 
1                    A       1980-04-10 
1                    B       1982-03-08
(2 row(s) affected)
The second result set […]

By |October 4th, 2016|Categories: Transact-SQL|Tags: , |2 Comments

SQL Server 2016 – Sort Operator with Batch Mode Processing

Hello Friends,

There are lots of features and improvements announced by Microsoft in SQL Server 2016, one of them is providing the sort operator with batch mode processing. In the programming world, we know that  performing row by row processing take longer time as compared to perform the same processing in batch mode. If the […]

SQL SERVER – Trace Flags

To know about a topic we usually ask questions. Here I used the same method to explain about trace flags of SQL Server.

Below are some basic questions and its answers on this.

What is the use of Trace Flag?

Trace Flags are used to enable or disable certain functionality of SQL server temporarily. It is used to […]

By |September 29th, 2016|Categories: SQL Server, Transact-SQL|Tags: , , |0 Comments