I have a table with a column that stores a random string like this:
example_id = qwhs77gt65g7*
Now some of the data on that column has asterisks(*) while others don’t have one.
I need to select those that has one. I’m using this query:
SELECT example_id FROM example_tbl WHERE example_id LIKE ‘%*%’
Now this is usually not a problem but I’m querying millions of rows and as I understand LIKE operator is affecting my performance. It takes hours to complete the query
My question is whats the alternative to the LIKE operator?
PS the asterisks is always at the end of the string. I dont know if that can help