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)
5246
August 30, 2005 11:33AM
8324
December 07, 2006 10:30AM
9704
September 23, 2005 01:56AM
4960
October 05, 2005 04:58AM
6175
October 05, 2005 11:49PM
5421
October 06, 2005 01:34AM
6743
October 06, 2005 04:57PM
6570
January 21, 2008 10:14AM
5901
January 21, 2008 10:53AM
5377
May 19, 2008 09:41AM
5576
February 05, 2008 10:27AM
6122
March 12, 2008 08:37AM
6170
November 14, 2008 12:31AM


Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

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.