mysql - How to speed up my sql queries? -
i have huge database (mysql) 7 tables (1000000 record each) use simple queries call information :
select * matches match_date='$date' select * countries country_id in (select country_id tournaments id='$id') select * tournaments id='$id'
i use indexing columns in clause query being faster bit.
does have helping ideas improve speed exponentially?
the worst request seems one:
select * countries country_id in ( select country_id tournaments id='$id')
try use this:
select countries.* countries inner join tournaments on countries.country_id=tournaments.country_id , tournaments.id=$id
index these columns:
- countries.country_id
- tournaments.country_id
- tournaments.id
and better use columns names instead of *.
Comments
Post a Comment