Help with SQL tuning
Hi Folks,
Have a requirement to tune a SQL query with a LIKE statement.
The search is based on email domains,
EMAIL LIKE ('%.gmail.com')
The query fetches results almost immediately when it has a wildcard character at the end, but slow when wildcard is in the front.
I understand wildcard as the first character tends pose problems as it doesn't use index in a proper way.
Looking for your advice.