Quantcast
Channel: Sql Server – SqlHints.com
Browsing all 130 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Implicit conversion an evil for Index – Tip 1: Sql Server 101 Performance...

In Sql Server when we compare a column of lower data type to a value of higher data type, then it leads to an implicit conversion of the column of lower data type to the type of the value which we are...

View Article


Image may be NSFW.
Clik here to view.

Evils of using function on an Index Column in the WHERE clause– Tip 2: Sql...

Using a function on an Indexed Column in the WHERE clause leads to an Index/Table Scan instead of an Index Seek. This issue occurs in majority of the scenarios, but in some cases Sql Server does Index...

View Article


Image may be NSFW.
Clik here to view.

Does the order of Columns in a Composite Index matters? Tip 3: Sql Server 101...

The order of the columns in a composite index does matter on how a query against a table will use it or not. A query will use a composite index only if the where clause of the query has at least the...

View Article

Image may be NSFW.
Clik here to view.

How to find the list of all Pages that belongs to a Table and Index? Tip 4:...

I was writing an article on when and why we have to use included columns and wanted to explain it by showing how key column and included column values are stored in the Index Pages. That time, I got...

View Article

Image may be NSFW.
Clik here to view.

How to get an Index’s Root Page, Intermediate Pages and Leaf Pages...

In this article, I will explain you on How to get an Index’s Root Page, Intermediate Pages and Leaf Pages Information. Prior to that let us get some insights into the Index structure. In Sql Server an...

View Article


Image may be NSFW.
Clik here to view.

How to Inspect the content of a DATA PAGE or INDEX PAGE ? Tip 6: Sql Server...

In the previous articles “How to find the list of all Pages that belongs to a Table and Index?” and “How to get an Index’s Root Page, Intermediate Pages and Leaf Pages Information?” I have explained...

View Article

Image may be NSFW.
Clik here to view.

Do we need to include a Clustered Index Column too in a Non-Clustered Index...

Answer to this question is NO, because by default when we create a Non-Clustered Index in Sql Server it adds the Clustered Index Key Column values too in the Non-Clustered Index. Let us understand this...

View Article

Image may be NSFW.
Clik here to view.

How to get Day of Year from date in Sql Server

Many a times we come across a scenario where we may need to get Day of Year from Date in Sql Server. In this article we will see how we can get Day of Year from Date in Sql Server. Approach 1: Using...

View Article


How to get the Length of a String in Sql Server?

In Sql Server we can use the LEN() function to get the length of a string. This function returns the number of characters in a string except the trailing spaces, but it includes the leading spaces....

View Article


Image may be NSFW.
Clik here to view.

Indexes in Sql Server – Part I

If you need your query to run faster, then you must know about the indexes. In this series of articles on Indexes, I will walk you through Sql Server Indexes with examples and explain how Sql Server...

View Article
Browsing all 130 articles
Browse latest View live