Interview question – Is Clustered index on column with duplicate values possible?

Through this article, we are going to discuss three important interview questions of SQL which are given below:-  1) Can we create clustered index on a column containing duplicate values?  2) Can we create a Primary Key on a table on which a clustered index is already defined? 3) If a clustered index is already defined on a […]

Continue Reading

SQL Script to find the missing indexes

Script to find the missing indexes Performance tuning in SQL is important exercise and index creation is an important part of it. Sometimes base on the frequent SQL queries, we need to create some indexes or missing indexes which are enhance the query performance. Below script will help in finding the missing indexes. SELECT db_name(d.database_id) dbname , object_name(d.object_id) […]

Continue Reading

Script to find the Fragmentation of indexes

Script to find the Fragmentation in Indexes In my previous articles, Fragmentation in SQL Server and Rebuild And Reorganization of Indexes , we talk in detail about Index fragmentation and rebuild or reorganize the indexes. Below is the SQL script which we can use to find the Fragmentation in Indexes created on the database. SELECT OBJECT_NAME(OBJECT_ID), index_id,index_type_desc,index_level, […]

Continue Reading

Rebuild And Reorganization of Indexes

Rebuild and  Reorganization of Indexes SQL Server has the ability of maintaining the indexes whenever we makes changes (update, Insert, Delete) in the tables. Over a period of time, the may causes the fragmentation on the table in which  the logical ordering based on the key value pairs does not match with the physical ordering inside the data […]

Continue Reading

Fragmentation in SQL Server

Fragmentation:- Fragmentation can be defined as condition where data is stored in a non continuous manner. This article help in understanding the fragmentation in SQL Server. It can be defined into two types1. Internal Fragmentation 2. External Fragmentation Internal Fragmentation:- In this fragmentation, there exists a space between the different records within a page. This […]

Continue Reading