Hi, how optimisation mysql query?
Now I use Limit function, don't use *.
how else can I speed up the operation?
Thanks
Hi, how optimisation mysql query?
Now I use Limit function, don't use *.
how else can I speed up the operation?
Thanks
To give you any specific advice, we'd need to see a specific query.
In general, the rules are simple:
JOIN
ingINDEX
on columns (or combinations of columns) that you're likely to use often, especially those you're using to filter results.Optimizing a specific query will often involve subtle changes to grouping, joins, conditions, fields, and ultimately every part of the query, but of course that sort of attention requires having a specific query to work with.
@lolalola, you will probably get better responses if you provide your query for people to look at.
Without that the best I can do is direct you to mySQL's documentation on optimization:
http://dev.mysql.com/doc/refman/5.0/en/optimization.html
You will probably get the most bang for your buck by reading up on the following: