Hi all! I've managed to set-up a working MySQL cluster setup, I am in production mode and no bugs occured. However, the select queries are VERY slow. Example, I have a view which is made of:
CREATE VIEW vw_users AS SELECT u.*, pc.*, ci.*, pr.*
FROM users AS u
LEFT JOIN postalcodes AS pc ON pc.id = u.postalid
LEFT JOIN cities AS ci ON ci.id = pc.cityid
LEFT JOIN provinces AS pr ON pr.id = ci.provinceid
The users table has 276 records, this is very few. Yet, this query takes up to 0.9 seconds to run. This is slowing my pages to a crawl.
My setup:
mysqld + management : Dell PowerEdge 2650 (2 Xeon)
ndb (2x): Dell PowerEdge 2650 (2 Xeon) (2x)
I am using a full-duplex isolated Cisco Catalyst 2900XL 100Mbps switch. Traffic is not enough for a gigabit switch. The machines have 2GB RAM and run CentOS 6.2
My config.ini file:
[ndbd default]
NoOfReplicas = 2
DataDir = /var/lib/mysql-ndb-data
DataMemory = 768M
IndexMemory = 128M
StringMemory = 256M
TransactionBufferMemory = 1M
MaxNoOfOrderedIndexes = 1024
MaxNoOfAttributes = 10000
MaxNoOfTables = 2500
MaxNoOfConcurrentOperations = 250000
MaxNoOfConcurrentIndexOperations = 250000
MaxNoOfExecutionThreads = 2
LockPagesInMainMemory = 1
RealtimeScheduler = 1
According to my tests, the delay comes from the select query. I had a PHP script testing all that, and I got:
Connection: 0.000945 seconds
Select DB: 0.0002169 seconds
Query the 276-row users view: 0.880137 seconds (WHOA!)
Nothing else is on the same network as my nodes. No error in log files. All my indexes are correct and nothing wrong according to EXPLAIN SELECT.
In your opinion, what's wrong?
Thanks
CREATE VIEW vw_users AS SELECT u.*, pc.*, ci.*, pr.*
FROM users AS u
LEFT JOIN postalcodes AS pc ON pc.id = u.postalid
LEFT JOIN cities AS ci ON ci.id = pc.cityid
LEFT JOIN provinces AS pr ON pr.id = ci.provinceid
The users table has 276 records, this is very few. Yet, this query takes up to 0.9 seconds to run. This is slowing my pages to a crawl.
My setup:
mysqld + management : Dell PowerEdge 2650 (2 Xeon)
ndb (2x): Dell PowerEdge 2650 (2 Xeon) (2x)
I am using a full-duplex isolated Cisco Catalyst 2900XL 100Mbps switch. Traffic is not enough for a gigabit switch. The machines have 2GB RAM and run CentOS 6.2
My config.ini file:
[ndbd default]
NoOfReplicas = 2
DataDir = /var/lib/mysql-ndb-data
DataMemory = 768M
IndexMemory = 128M
StringMemory = 256M
TransactionBufferMemory = 1M
MaxNoOfOrderedIndexes = 1024
MaxNoOfAttributes = 10000
MaxNoOfTables = 2500
MaxNoOfConcurrentOperations = 250000
MaxNoOfConcurrentIndexOperations = 250000
MaxNoOfExecutionThreads = 2
LockPagesInMainMemory = 1
RealtimeScheduler = 1
According to my tests, the delay comes from the select query. I had a PHP script testing all that, and I got:
Connection: 0.000945 seconds
Select DB: 0.0002169 seconds
Query the 276-row users view: 0.880137 seconds (WHOA!)
Nothing else is on the same network as my nodes. No error in log files. All my indexes are correct and nothing wrong according to EXPLAIN SELECT.
In your opinion, what's wrong?
Thanks