| Help: bad performance [message #1019] |
Mon, 02 April 2007 11:17  |
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   |
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 #1028 is a reply to message #1019 ] |
Fri, 06 April 2007 04:33  |
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
|
|
|