Skip to content

Latest commit

 

History

History
10 lines (9 loc) · 588 Bytes

3007.md

File metadata and controls

10 lines (9 loc) · 588 Bytes

Pattern Matching Usage

Avoid using vanilla pattern matching:

The most important disadvantage of pattern-matching operators is that they have poor performance. A second problem of simple pattern-matching using LIKE or regular expressions is that it can find unintended matches. It's best to use a specialized search engine technology like Apache Lucene, instead of SQL. Another alternative is to reduce the recurring cost of search by saving the result. Consider using vendor extensions like FULLTEXT INDEX in MySQL. More broadly, you don't have to use SQL to solve every problem.