MySQL query question
I have a name field in my database like this -table has 15M rows
'Jones, Albert Louis'
Where the field is like this
last name, first name, middle name
I have a cf search that the user can enter a first name and last name and a middle name that searches that field
I have everything indexed properly
When I do this query I get results immediately
select *
FROM table
where
name LIKE 'Jones%'
But when I add the first name the query never returns results or takes a very long time
Like this
select *
FROM table
where
name LIKE 'Smith%, John%'
Is my syntax correct? Is there a better way to do this query?
