0

I found many question, But no solutions.

An index can not be used to speed up queries where the search criteria starts with a wildcard:

LIKE '%text%'

An index can (and might be, depending on selectivity) used for search terms of the form:

LIKE 'text%'

So this means I simply cant use a full wildcard in a big table?

1 Answer 1

2

Exactly. Which is why some databases use alternative indexing mechanisms for text. SQL Server has a full text indexing capability that works by breaking the string into WORDS, removing bad ones (like "in" in english - happens too often) and then uses a different syntax for finding words in the text index.

Standard SQL Indices are simply not suited for the task.

MySQL, from a 30 second run in google, also seems to have a full text search mechanism.

1
  • thx, I need support for more than full words Commented Apr 21, 2016 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.