I have a table with 3 columnsVARCHAR
. I want to make a query to search if an alphanumeric string satisfies these 3 columns. For example :Similar to "%whatever%"
, but faster.
I've seenFULLTEXT
indexing used and it works well, but only if I have the words used in natural language. However, these 3 columns contain codes, references.
Example: Use keyword1234
to find referenceREF12345
.
Do you have any ideas?
If you added indexes and need faster speed -> try usingDB HINTS(not all vendors have this feature but mysql does) or you can try using cache
Mysql Tip:https://dev.mysql. com/doc/refman/8.0/en/optimizer-hints.html
Good article about hints:https://ologicalread.com/mysql -query-hints-improve-performance-mc12/
Mysql cache:https://dev.mysql. com/doc/refman/5.7/en/query-cache.html