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 2005 Forums
 Transact-SQL (2005)
 very slow search

Author  Topic 

magmo
Aged Yak Warrior

558 Posts

Posted - 2011-05-19 : 09:26:14
Hi

I have a table with a lot of varchar columns and about 1.5 million rows, to search for 2 columns take about 1 minute in Sql server manager. Is there a way to speed up the process?

lionofdezert
Aged Yak Warrior

885 Posts

Posted - 2011-05-19 : 09:51:08
do you have proper indexes ? specially on columns which are a part of Group BY, Order By or WHERE clause

--------------------------
http://connectsql.blogspot.com/
Go to Top of Page

magmo
Aged Yak Warrior

558 Posts

Posted - 2011-05-19 : 10:31:52
Hi, there is only index on the PK, should I add indexes to the 2 columns I filter on?
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2011-05-19 : 10:57:18
Yes.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

magmo
Aged Yak Warrior

558 Posts

Posted - 2011-05-19 : 11:55:00
The improvement was huge, thanks a lot for the help.
Go to Top of Page
   

- Advertisement -