There are a lot of posts and discussions on the matter, but here are some tips:

- replacing distinct with a group by on an unique column can/would speed up the query quite a lot

- there is a variable called query_cache_min_res_unit. Use: show status like ‘qc%’; in the mysql console and especially check the Qcache_lowmem_prunes. If there are a lot of them, it means that the memory gets fragmented, as min_res_units are too big. Gives quite a big performance penalty, especially under a lot of concurrent requests and a cache invalidation

- some order by queries might be improved by using force index(…) with the proper index. Sometimes, it clears the filesort that gets used by default.

Save and share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Mixx
  • Google
  • StumbleUpon
  • Technorati
  • YahooMyWeb

Comments

Leave a Reply




Advertisements