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 |
yoyosh
Starting Member
27 Posts |
Posted - 2013-03-08 : 08:19:54
|
I have a table with ~10M of rows. One column in that table is nvarchar(200). I must perform queries against this table that return all rows in which this column containst some input parameter.I tried:select * from A where A.b like '%' + inputparameter + '%'But this is dramatically slow.Then I tried using fulltext search with CONTAINST function:select * from A where contains(A.b, inputparameter)It's quicker, but still not enough.What else could I do? Does it make sense to define index on this column (even though I defined fulltextsearch index on it)? What else could be done to speed it up? |
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2013-03-08 : 11:47:57
|
Other than not using SQL, you might look into you disk system as that is usually the bottle-neck. But, first I'd identify the bottle-neck. Is the data spread over many disks? Are there multiple data files (also on differe disks)? Are you using SSD drives? How much memory do you have? 10M isn't that many rows, but using a "search" like that SQL can't really take advantage of any indexes, so that probalby won't help. |
|
|
yoyosh
Starting Member
27 Posts |
Posted - 2013-03-08 : 12:36:16
|
Hardware and architecture stuff is one thing. I will take it under consideration. But now I am considering mainly sql-related techniques. Accodring to your post there is not much I could do, is it? |
|
|
|
|
|