MYSQL Search query taking too long in php. Server times out -


i have table sub_mastersheet around 50 columns , 30,00,000 entries. trying run query in taking way long , server times out. other queries on table working ok.

here query:

select * sub_mastersheet contributor_name1 = '$author' or contributor_name2 =  '$author' or contributor_name3 = '$author'; 

i've tried:

select * sub_mastersheet contains(contributor_name1, '$author'); 

none of above 2 queries working , server times out. on php admin these queries take hour execute. can help?

add index on columns (contributor_name2,contributor_name2)

it improve performance of query.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -