Database Reference
In-Depth Information
As you can see, MariaDB's wildcards are powerful. But that power comes with
a price: Wildcard searches typically take far longer to process than any other
search types discussed previously. Here are some tips to keep in mind when
using wildcards:
Don't overuse wildcards. If another search operator will do, use it
instead.
■
When you do use wildcards, try to not use them at the beginning
of the search pattern unless absolutely necessary. Search patterns that
begin with wildcards are the slowest to process.
■
Pay careful attention to the placement of the wildcard symbols. If they
are misplaced, you might not return the data you intended.
■
Having said that, wildcards are an important and useful search tool and one that
you will use frequently.
In this chapter, you learned what wildcards are and how to use SQL wildcards
within your
WHERE
clauses. You also learned that wildcards should be used
carefully and never overused.