Home » Performance » MySQL » Help: bad performance
Help: bad performance [message #1019] Mon, 02 April 2007 11:17 Go to next message
ruid  is currently offline ruid
Messages: 2
Registered: April 2007
Junior Member
I have two questions below:
1. The query speed is very slow, I was just wondering whether it was normal or not: My CPU is Intel Xeon Processor Dual-Core 2.4GHz and the memory is 1GB. There are 40,000 records in the database. When I deleted 150 records, the operation took 2 minutes.

2. I always encounter an error: Fatal error: Maximum execution time of 90 seconds exceeded in c:\program files\apache group\apache\htdocs\sugarcrm\include\database\MysqlManager.p hp on line 139
Is it possible if we modify the period of maximum execution time to make it longer?
Thanks very much in advance!

[Updated on: Mon, 02 April 2007 11:25]

Re: Help: bad performance [message #1023 is a reply to message #1019 ] Tue, 03 April 2007 05:46 Go to previous messageGo to next message
Speeple  is currently offline Speeple
Messages: 91
Registered: August 2006
Member
Hi,

You can set the max execution time by putting the following in the top of your PHP script:

set_time_limit(i);

Where i is a positive integer representing the max execution time in seconds.

The delete sounds like you're doing a DELETE with a WHERE clause with no indexes on the appropriate columns.

We'd need to see an example query to give advice on which columns to index.

Proper indexing in this case should remove the need for upping PHP's maximum execution time.


Martin Gallagher | Speeple: The latest news
Re: Help: bad performance [message #1024 is a reply to message #1023 ] Tue, 03 April 2007 06:01 Go to previous messageGo to next message
ruid  is currently offline ruid
Messages: 2
Registered: April 2007
Junior Member
Speeple,

Thanks very much for your reply!

I forgot to mention that the operation system is windows2000Server and I executed the "delete" operation in a software called SugarCRM that I never used before. So I was just wondering that the problem is because of Mysql or SugarCRM.Thanks!
Re: Help: bad performance [message #1028 is a reply to message #1019 ] Fri, 06 April 2007 04:33 Go to previous message
Speeple  is currently offline Speeple
Messages: 91
Registered: August 2006
Member
Hmm sugarcrm.com appear to be a professional org, so I would imagine they would cover things like putting suitable indexes on the database to produce fast DELETES. But given the stats you've posted I will still say the DELETE query isn't utalizing indexes correct or not at all.

You should set up the MySQL slow query log and post the DELETE query that takes 2 mins here with an EXPLAIN.


Martin Gallagher | Speeple: The latest news
Previous Topic:MYSQL goes very slow after every 4-5 hours
Next Topic:mysqldump speed for a DB with thousands of tables
Goto Forum:
  


Current Time: Fri Jul 10 01:47:21 EDT 2009

Total time taken to generate the page: 0.01425 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.