Link to home
Start Free TrialLog in
Avatar of saroopchand
saroopchand

asked on

Tunning of SQL query

I have a table which have more than 4m (4,000,000) records.
When i query as
SELECT * FROM TBL_RECORD WHERE NAME = 'test', it takes 2 seconds.
When i use like it takes 4 seconds.
SELECT * FROM TBL_RECORD WHERE NAME like '%test%'

I want to use the like condition in a stored procedure, but can anyone please let me what other statement can i add to faster the query.
ASKER CERTIFIED SOLUTION
Avatar of BillAn1
BillAn1

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Lowfatspread
Lowfatspread
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
create index  on NAME field - if you have not yet