What are indexes? When do you need to create Indexes?

Answer Posted / radhakrishnan

index : increase the performance of sql statement.

When we create :
1) large number of data in table
2) most of null value in specific column
3) multiple join in sql statement
4) less than 2% of data retrive from table

when we not create :
1) frequently update the table
2) less number of data

Type of Index :
1) clustered index
- primary & unique constaint cretae autoatically for this
index
- only one clustered index per table.
- data sorted physical order
- Eg : book front index
2) non clustered index
- create multiple index per table.
- Eg : book back index

Syntax :

Create index index_name on tablename (column name)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is update_statistics command?

576


Explain cdc and sql injection?

550


What is tcl in sql server?

671


Explain the ways to controlling cursor behavior?

547


What is the sql case statement used for?

562






How to resolve the orphan use problem? : sql server security

527


How many clustered indexes can be created on a table? I create a separate index on each column of a table. what are the advantages and disadvantages of this approach?

682


Due to some maintenance being done, the sql server on a failover cluster needs to be brought down. How do you bring the sql server down?

874


What is normalization and what are the advantages of it?

522


you accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover? : Sql server administration

721


How do I completely remove sql server instance?

569


What is 1nf 2nf and 3nf?

494


What is the difference between online clustering and Offline clustering?

1921


How to receive returning result from a query?

586


Write a SQL command to insert and update only a particular field?

636