Quantcast
Channel: Answers for "Is there any alternative for like operators - for searching data"
Browsing all 8 articles
Browse latest View live

Answer by Martin Schoombee

You are doing a lot of unnecessary work in that query. ...like '%' + @word + '%'...already covers "starts with" and "ends with" criteria, so you' don't need a lot of those conditions.

View Article



Answer by Grant Fritchey

The type of search you're providing is one of the most difficult to accomplish. What you're seeing is that using the LIKE '%anything' is causing scans and can only ever cause scans. The first way to...

View Article

Answer by TimothyAWiseman

Grant and Martin both have great answers and I echo everything they said. To add on a bit, depending on how this is called you may consider not automatically adding the % wildcard and let the user...

View Article

Answer by Mister Magoo

Again, depending on the size of the data, you could consider having a words table. When you store a row in your data table, you also split out the words from the address and record the usage in your...

View Article

Answer by Martin Schoombee

You are doing a lot of unnecessary work in that query. ...like '%' + @word + '%'...already covers "starts with" and "ends with" criteria, so you' don't need a lot of those conditions.

View Article


Answer by Grant Fritchey

The type of search you're providing is one of the most difficult to accomplish. What you're seeing is that using the LIKE '%anything' is causing scans and can only ever cause scans. The first way to...

View Article

Answer by TimothyAWiseman

Grant and Martin both have great answers and I echo everything they said. To add on a bit, depending on how this is called you may consider not automatically adding the % wildcard and let the user...

View Article

Answer by Mister Magoo

Again, depending on the size of the data, you could consider having a words table. When you store a row in your data table, you also split out the words from the address and record the usage in your...

View Article

Browsing all 8 articles
Browse latest View live




Latest Images