Has anyone found a Viable Solution?
Has anyone found a Viable Solution?
I have the same problem, sometimes a query will hang the with the status: “Copying to tmp table”.
What I have found is that it does not have much to do with the OS or the hardware configuration and also happens when the offending query is the ONLY query run on the server. Also, I’m not concerned about slow performance, but simply queries that are completely hung with this message, queries that can and should take 20 seconds hanging for day, weeks and probably years if I would let them.
This occurrence of such “hung” queries if not acceptable for any enterprise level database engine, I expect an error and termination of a query if some resource is exhausted and in the same way be able to trace such problems back to resource exhaustion, but I can’t, the problem occurs even if the server is otherwise idle and has apparently lots of free memory, cpu cycles and hard drive space.
Doesn’t this mean it is a bug or poorly written code that is unable to gracefully handle a deadlock for some resource and shouldn’t someone have fixed it by now? If not then there has to be a miss configuration and can be resolved, but what is it?
What I consider Viable Solutions:
Configuration Change or Program Update that will permanently resolve this issue
For example, disabling support for tmp tables, I don’t care if it takes 10x as long, if it DOESN’T HANG it is very acceptable.
What I do NOT consider as a viable solution:
Scripts that detect and terminate such hung queries (once my query hangs is is about 95% likely to hang again on the next attempt until the server has restarted, and no, flushing tables doesn’t help a thing)
Random changing of variables in the hope of staving off the occurrence for some time
Blaming it on OS/Hardware (I have seen it in too many different hardware/os’s)
Blaming it on load (happens when the query /user/thread is the ONLY one)
and any other solution that does not stop this from happening.
Currently I am running on a MySQL 4.1, installed and configured using the windows installer and set to “stand alone server” (max server resources) & "transaction type" (InnoDB) & "olap" (max 20 conn), no other configuration changes have occurred.
The OS is Windows 2003 Server x64 (I know, running Linux AMD64 MySql would be better instead of the 32bit window version, but it has not effect on this problem)
The Server is a Dual Opteron box, 4GB memory, two separate RAID controllers, one for the system and applications including MySQL binaries, and the other purely for MySql’s data files. The table I am running the query on has bout 27 fields, (all constant sizes, not text fields of any kind) and about 7.6 million records. With a simple but large query that ammounts to a avg/sum/std/max/min where id in subquery group by. All used tables are stored using InnoDB.
I have had trouble with teh same query on a Xenon server too.
Please let me know if you had this problem and somehow resolved it permanently/reliably.
Edited 2 time(s). Last edit at 10/17/2005 05:27AM by Frank Osterberg.
Subject
Views
Written By
Posted
27504
August 11, 2005 11:25AM
23626
August 12, 2005 09:07AM
18932
August 12, 2005 01:06PM
18408
August 22, 2005 09:46AM
16500
August 24, 2005 03:27PM
12960
August 24, 2005 04:05PM
13644
August 26, 2005 11:02AM
7426
August 26, 2005 11:05AM
6806
August 26, 2005 11:45AM
6586
August 26, 2005 05:46PM
6854
August 26, 2005 10:34PM
6459
August 25, 2005 01:08PM
5855
August 26, 2005 11:07AM
5657
August 27, 2005 09:09AM
5981
August 29, 2005 11:50AM
5904
August 29, 2005 12:04PM
5261
August 29, 2005 12:55PM
5146
August 29, 2005 05:26PM
5117
August 29, 2005 06:34PM
4748
August 29, 2005 08:40PM
4635
August 29, 2005 08:47PM
4500
August 29, 2005 09:00PM
4696
August 30, 2005 10:05AM
4577
August 30, 2005 10:18AM
5089
August 30, 2005 10:20AM
6102
August 29, 2005 08:53PM
4967
August 29, 2005 09:50PM
4805
August 29, 2005 10:01PM
5247
August 30, 2005 08:53AM
4657
August 30, 2005 11:22AM
5203
August 30, 2005 11:33AM
4868
August 30, 2005 11:59AM
24333
August 31, 2005 02:32PM
6502
August 31, 2005 02:49PM
5186
August 31, 2005 02:56PM
5040
August 31, 2005 03:06PM
8275
December 07, 2006 10:30AM
4980
August 31, 2005 03:10PM
4851
August 31, 2005 03:32PM
17695
August 31, 2005 07:15PM
5094
September 01, 2005 03:05AM
7812
September 15, 2005 04:31PM
5533
September 01, 2005 04:39AM
4436
September 08, 2005 09:53AM
4795
September 08, 2005 11:25AM
4575
September 26, 2005 11:52AM
4485
September 26, 2005 12:13PM
4418
September 27, 2005 09:55AM
4200
September 27, 2005 10:18AM
4095
September 28, 2005 10:29AM
4242
September 28, 2005 10:34AM
4415
September 28, 2005 10:52AM
4879
September 28, 2005 10:58AM
Has anyone found a Viable Solution?
9654
September 23, 2005 01:56AM
4941
September 23, 2005 07:11AM
4916
October 05, 2005 04:58AM
5135
October 05, 2005 04:52PM
6120
October 05, 2005 11:49PM
5382
October 06, 2005 01:34AM
6696
October 06, 2005 04:57PM
4630
December 13, 2005 10:28AM
4620
December 13, 2005 10:34AM
4524
November 17, 2005 09:39AM
4888
January 08, 2007 12:12PM
4755
December 12, 2005 02:13PM
4604
December 14, 2005 11:43PM
4198
December 15, 2005 08:37AM
4270
December 15, 2005 11:18AM
4182
December 15, 2005 11:27AM
4301
December 15, 2005 11:32AM
4054
December 15, 2005 11:43AM
4013
December 15, 2005 11:43AM
4184
December 15, 2005 11:48AM
4075
December 15, 2005 11:51AM
4468
December 15, 2005 02:14PM
4121
December 15, 2005 02:18PM
3989
December 15, 2005 02:27PM
4495
December 15, 2005 02:43PM
4038
December 15, 2005 08:46AM
5024
January 26, 2006 12:38PM
4149
January 26, 2006 01:48PM
4227
January 26, 2006 01:48PM
4010
January 26, 2006 01:52PM
4153
January 27, 2006 04:46PM
4031
January 29, 2006 11:21AM
4371
January 30, 2006 09:42AM
4403
February 27, 2006 02:17PM
4089
February 27, 2006 02:23PM
4317
March 05, 2006 04:56AM
4136
March 06, 2006 08:09AM
4103
April 05, 2006 01:03PM
4285
September 27, 2006 08:43AM
4238
November 19, 2006 04:42AM
4390
December 14, 2006 05:45PM
4209
February 01, 2007 04:40AM
4877
November 11, 2007 01:24PM
5085
December 20, 2007 10:40AM
6519
January 21, 2008 10:14AM
5859
January 21, 2008 10:53AM
5321
May 19, 2008 09:41AM
5532
February 05, 2008 10:27AM
6074
March 12, 2008 08:37AM
5394
May 19, 2008 03:02AM
6133
November 14, 2008 12:31AM
7143
March 06, 2009 03:36PM