Help: bad performance

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!

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.

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!

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.