Currently browsing category

MS-Sql

Function in WHERE clause

Function in WHERE clause

  Introduction When we are using the function in the SELECT statement it returns data depends on the number of records retrieve by the select statement and what type of value is passed in the scalar function. The performance of the MS SQL Query is little bit degraded using the …

sql2008

Understanding NULLIF and ISNULL

Introduction One of my friends wants to know about two functions NULLIF and ISNULL. In this article I am trying to discuss about that. Understanding NULLIF First we look at the syntax of the NULLIF The syntax is: NULLIF(Expression, Expression) Return type: Return type is the same type of the …

Performance

INNER or LEFT JOIN for Performance

INNER or LEFT JOIN for Performance In this article I am trying to discuss a very common scenario that between INNER JOIN and LET JOIN which one is increase the performance and also discuss how to boost the join performance. First look at the definition of both INNER and LEFT …

Copying Table with INDEX and CONSTRAINTS

Copying Table with INDEX and CONSTRAINTS Introduction When we are trying to copy a table (Structure only or with Data) we are unable to copy the Indexes, constraint with it. Can we copy Indexes and Constraint with Table structure in the same database? This article is related to it. General …

Dynamic SQL result stored in a TABLE

Dynamic SQL result stored in a TABLE Introduction As we all know that the dynamic SQL is not good where performance is concern. But sometimes we don’t have other choices. As I personally think that, no developer chooses the dynamic SQL with interest, but they choose it as they have …

IN EXISTS clause and their performance

“IN”, “EXISTS” clause and their performance Introduction To improve the performance of the Query, the general guideline is not to prefer the “IN” Clause. The guideline of the MS SQL query performance says that if we needs “IN” clause, instead of using “IN” clause we must use the “EXISTS” clause. …

Improve the performance by Execution Plan

Improve the performance by Execution Plan Introduction Developers ask a common quest “How to improve the performance of a SQL Query”. It is not so easy to answer as lot of factors is related to it. There are some general guidelines that we can follow to improve the overall performance …

Columns Without Data Type

Columns Without Data Type Introduction  “Can you make a table with CREATE TABLE statement, where there are 4 columns and 1 of   the columns  is without data type?” If we heard this above statement, we definitely think for 2 to 3 seconds. That the columns without data type? The …

sqlvariant

sql_variant Introduction Data type is a very important factor. Think about situations when we the developers are little bit confused related to data type and don’t actually know what type of data actually stores. To solve this type of data type related problem the MS SQL Server provides a special …

DATETIME in WHERE Clause

DATETIME in WHERE Clause Introductions I saw that a lot of developer makes some common mistake when they are working with DATETIME data type in T-SQL statement. In this article I am trying to gather some common tips and tricks related to DATETIME data type when used in WHERE clause …

CLR Integration with MS SQL Server

CLR Integration with MS SQL Server Introduction My friend told me that the CLR Integration is quite complex. I think that nothing is complex if we understand it properly. So in this article I am trying to discuss about MS SQL server CLR integration. I try to demonstrate it as …

Permission set of CLR

Permission set of CLR Introduction In my previous article named “CLR Integration with MS SQL Server” lot of my reader asking for permission set. But I told them that in my first article related to CLR are an introductory article to grow interest of new developer. In this article I …