SQL Server - Fast searching Data from Database

Asked By ALOK RANJAN on 21-Jun-12 05:37 AM
hi everyone,

                             I have  a table in sqlserver database which contains 15,00000( 1.5 crore record )
                      and field are Registration No,CSC Code,Physical Code now I want to search record according to Registration number but when we enter Reg No. It take too much time to find that particular record .now  I want quick result from database how it possible .

Thanks & Best Regards

Jitendra Faye replied to ALOK RANJAN on 21-Jun-12 05:52 AM
To increase performance of the query follow these:

1.Create Index in the table.
2.Have a Primary key in the table while creating.
3.Use Joins instead of subqueries.
4.Instead of selcting "*" specify the Column names in the select statement.

hope this will help you.
Sunil Darji replied to ALOK RANJAN on 27-Jun-12 05:31 AM

  step to increase performance.

  1. Create Index on Registration no column.
  2. Not use inner query.
  3. user require column name in select statement.

 Hope will help u!!!