SQL Server Performance Forum – Threads Archive
select query to table 20 million rows with likeI have a table which has about 1-20 million rows .I execute query againt this
table in my where clause i have like against 2 columns .I want to execute this
query very fast.This query execution rate is very fast.
The table is now in single hard disk .I can add more hard disk to the system.
Can i distribute the load of this query to all the hard disk so that it execute
parallely .I also need some guide ,tutorial for parallel processing with sql server. Thanks
Check if you have proper indexes first and if the stats are upto date. Does your LIKE statement look like :
WHERE comecol LIKe ‘%something’ If so, the SQL Engine will not use any indexes. Try to narrow the search. These kind of things will give you more benefit vs adding hardware. ***********************
SQL Server MVP
Post your query….
As Dinakar mentioned….in the where clause while card should be at the end of the word not at the begining to use indexes…
SQL-Server-Performance.com All postings are provided â€œAS ISâ€ with no warranties for accuracy.
User enter keywords and i have to find the mathching columns which has this keyword.For e.g. user enter aaa bbb
My table has data like
aaa;bbb; i want 1 and 3rd row .this is oltp database.This query is executing very frequently. where clause is col1 like ‘%dddd%’ and col1 like ‘%www%’ .
In this case you have to normalize the data, adding a child table for the individual keywords, instead of listing them as a single string.
Madhivanan Failing to plan is Planning to fail
Madhi, question is not about passing arrays, it is about filtering on an multi-value column.