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:

http://dev.mysql.com/tech-resources/articles/pro-mysql-ch6.html

Cheers,

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

Got Cluster? http://www.mysql.com/cluster
Personal: http://jpipes.com

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Server just hanging (Copying to tmp table)
5287
August 30, 2005 11:33AM
8378
December 07, 2006 10:30AM
9747
September 23, 2005 01:56AM
5000
October 05, 2005 04:58AM
6224
October 05, 2005 11:49PM
5454
October 06, 2005 01:34AM
6791
October 06, 2005 04:57PM
6610
January 21, 2008 10:14AM
5940
January 21, 2008 10:53AM
5418
May 19, 2008 09:41AM
5612
February 05, 2008 10:27AM
6192
March 12, 2008 08:37AM
6224
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.