Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Performance Issue

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-10-28 : 08:41:44
Muhammad Alam writes "I have created a table in SQL Server 2000 DB having client information stored in it. Now I have more then 2500 records in it. So, whenever I run a query to fetch record whose company name like '%a' it takes lot of time to fetch the record. I am using ADO (NO SP USED) for it and the application is developed in ASP.

How can i speed up the search.. its a simple query with only one table.

Thankx."

smccreadie
Aged Yak Warrior

505 Posts

Posted - 2002-10-28 : 09:23:47
Your slowness is due to a full table scan on SQL Server and returning a lot of rows back across the ADO connection. Some suggestions:

1. Use a stored procedure
2. Index the search fields
3. Don't allow wildcards at the beginning of a string unless necessary (causes full table scan)
4. Consider a redesign. Is there 2500+ clients or are the clients stored multiple times?

Go to Top of Page
   

- Advertisement -