MySQL Query Optimize

What are the different methods to optimize the MySQL query?

Questions by nagaphp_indore

Showing Answers 1 - 3 of 3 Answers

svrajput

  • Apr 29th, 2009
 

It does not depend upon single entity. In order to optimize it you can look into following things. - Make sure table has primary key. - If there is any field which is used more frequently for searching then index it!. - The order of condition does matters. - In select statement where condition should have indexed column. - Fetch required amount of records from db (use limit clause). e.g. if you want total number of records then use count() function rather than select *.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions