Introduction
In this article I describe indexes, types of indexes, creation of indexes and the advantages and disadvantages of indexes.
Index:
Indexes are data structures that are used to improve the searching speed in a table. The user can not see the index directly. An index increases the performance of select statements and where clausees and slows down insert and update statements. So we create indexes only for those columns that are not frequently updated.
Type of index:
- Implicit Index
- Explicit Index
Implicit Index:
Implicit Indexes are created automatically, when we apply a Unique Key, Primary Key or other constraint of these types.
Explicit Index:
They are created by the user using the keyword Create Index. Here I describe only an Explicit Index.
First of all we create a table on which we apply the index.
Table:
create table emp(empId int, empName varchar(15))
go
insert into emp
select 1,'d'union all
select 2,'e'union all
select 3,'f'
go
select * from emp



Deepak MiddhaPosted Nov 27, 2012, 5:12 AM
Thanks Georige..
Georgie WebberPosted Nov 27, 2012, 2:24 AM
Very useful for beginers