MySQL Forums
Forum List  »  Performance

Re: Server just hanging (Copying to tmp table)
Posted by: Jay Pipes
Date: August 30, 2005 11:33AM

Your query cache is doing OK, IMHO. It will fill to 100% usage eventually, but the hit rate is OK for now. I think the biggest problem is that you're queries aren't really optimized to use indexes. It's evident to me (from the ~30% of your SELECT statements that are performing table scans) that you're queries are either a) requesting too much information (like having no WHERE clause or really large ranges of values), or b) don't have appropriate indexes with decent selectivity on them.

Also, could you give some insight as to what kind of applications are running on the box? Are they OLAP or OLTP, or mixed? I see a very high number of UPDATE/REPLACE operations compared to INSERT, which would sometimes make me advise using InnoDB for certain application needs, particularly heavy OLTP apps with many single-key UPDATEs. Please provide more information on the applications and what they're used for.

In order to best explain what's going on, you will absolutely need to turn on the slow query log and profile the server for at least an hour or two. Then, could you use mysqldumpslow on your slow query log and post the top results? Then run an EXPLAIN on the top results and post the results here using the \G option in the mysql client. If you're not familiar with mysqldumpslow, Chapter 6 from my book goes over its usage. You can download the chapter for free on mysql's website:


Jay Pipes
Community Relations Manager, North America, MySQL Inc.

Got Cluster?

Options: ReplyQuote

Written By
Re: Server just hanging (Copying to tmp table)
August 30, 2005 11:33AM
December 07, 2006 10:30AM
September 23, 2005 01:56AM
October 05, 2005 04:58AM
October 05, 2005 11:49PM
October 06, 2005 01:34AM
October 06, 2005 04:57PM
January 21, 2008 10:14AM
January 21, 2008 10:53AM
May 19, 2008 09:41AM
February 05, 2008 10:27AM
March 12, 2008 08:37AM
November 14, 2008 12:31AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.