I would like to have a question that I am facing a condition where I have to bring the result based on search query parameter and I have to implement paging in it too.
Let suppose a search string has PEPSI
I am querying it as below
Select * from product where product_title Like '%pepsi%' LIMIT 0,100
The table products have 50 million rows.
So, my question is that how MySQL will work? Is MySQL go through all the 50 million rows against the keyword PEPSI in the product table? If this is the case the query will be very slow and will take many minutes even I add pagination offset?