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.
Author |
Topic |
sql_er
Constraint Violating Yak Guru
267 Posts |
Posted - 2008-01-31 : 14:56:05
|
Guys,I have a table with ~500,000 records. It has a few columns - most of them INT types, but one of them is a TEXT data type. I need to search the TEXT column for certain strings. I have been doing searches like this:SELECT A.IDFROM AWHERE B LIKE '%ABC%'The return is usually ~ 100 records.Sometimes this query takes 10 seconds, but at other times it runs for 10 minutes and does not complete. I have been trying to figure out what is causing it, but still have no idea.So, my questions:1. Is there an efficient way of string search or this is the only thing I can do?2. Why would the same query take seconds at times, but minutes at other times?I checked to see if any heavy jobs were running at the time the query was taking long, but could not find anything. I wonder if I am overlooking something.Please advise.Thanks in advance! |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-01-31 : 23:12:08
|
Try with full text index. |
 |
|
sql_er
Constraint Violating Yak Guru
267 Posts |
Posted - 2008-02-01 : 14:05:08
|
rmiao,I don't think we have that installed. I guess I have to first have it installed before I can test this out ...Thanks |
 |
|
|
|
|