7 messages in com.mysql.lists.clusterRe: MySQL cluster 4.1.8 - Query Perfo...
FromSent OnAttachments
Alex Davies23 Feb 2005 04:40 
phil...@bt.com23 Feb 2005 08:53 
Alex Davies23 Feb 2005 10:55 
phil...@bt.com24 Feb 2005 02:18 
phil...@bt.com18 Mar 2005 06:43 
Stewart Smith20 Mar 2005 15:52 
Johan Andersson29 Mar 2005 04:51 
Subject:Re: MySQL cluster 4.1.8 - Query Performance
From:Johan Andersson (joh@mysql.com)
Date:03/29/2005 04:51:13 AM
List:com.mysql.lists.cluster

Hi,

first of all upgrade to latest version. Check that you have indexes on all relevant columns. Then check how the query is evaluated in MyISAM using explain. Check that the query is evaluated in the same way in ndbcluster. If not, rewrite the query or force optimizer to use certain indexes.

For some JOINs cluster can be a bit bad because the optimizer does not recognize the fact that it is using ndbcluster, but rather optimizes for local access.

B.r, johan

phil@bt.com wrote:

Hello,

I've an interesting situation where I could not understand why there is a big difference in term of performance.

Below is the query I run against a MySQL 4.1.8 database through a CGI script (not on Command line) and display the result on a browser

select *,date_format(dchgLastmodified, '%Y-%m%-%d %H:%i:%s') as tstamp from tcr_device_changes, tcr_devices, tcr_customers where devOwner in ('BE') AND dchgDevId = devId AND devCusId = cusId AND dchgDevId = 4180 AND dchgFieldNa me not like 'dev_r_Proviso%' AND dchgFieldName <> 'dev_r_SysDescr' ORDER BY dchgLastmodified DESC

Situation A:

MGM, NDB, MYSQLD are running on the same box

The result of the above query is nearly immediate.

Situation B:

MGM is running on machine1 NDB1, MYSQLD1 are running on machine2 NDB2, MYSQLD2 are running on machine3

The result back from the same query is after a while (+/-20 sec)

Could someone give me a hint on what could impair the performance.

Thanks in advance for your time.

Best regards,

Philong