mysql select query optimization and how limit works in mysql
问题 I am using mysql database which has only one table "data" with 17,151257 rows.This table has a column string . i want to print all the rows in which string column contains a particular query string (stored in "entered_query" variable), so i used following: SELECT DISTINCT * from data WHERE string LIKE '%".$entered_query."%' limit 10 As obvious above query is taking too much time to execute. I have read that indexing can be used but how in this case ? I have also thought of dividing whole data