MySQL Forums
Forum List  »  NDB clusters

Cluster crashes on any non trivial query
Posted by: jannis breitwieser
Date: March 21, 2006 05:00AM

Hi there,

I got a Cluster with 2 tables - one contains about 14 Million records, the second one contains 3 million records.

All relevant columns contain Integer data and are indexed.

The query:
select source,count(*) as number from links,pages p1, pages p2 where source = p1.id and target=p2.id and p1.host_id != p2.host_id group by source; (links contains 14 mio records, pages contains 3 million records).

What happens now is, the Mysqld node starts to fill up its ram (for about an hour), when the ram is full, it starts swapping and some time later the mysql crashes:

ERROR 2013 (HY000) at line 1: Lost connection to MySQL server during query


Any ideas how this problem can be solved?


-----------------------
Further information:


The Cluster contains
16 data nodes with 2 GB of ram
1 Msqld node with 2GB of ram (which also runs the ndbd)
All machines are connected via 100Mbit Lan only.

The cluster config:
[NDBD DEFAULT]
NoOfReplicas= 1
DataMemory=1400M
IndexMemory=400M

Explain says:

explain select source,count(*) as number from links,pages p1, pages p2 where source = p1.id and target=p2.id and p1.host_id != p2.host_id group by source;
+----+-------------+-------+--------+---------------+---------+---------+----------------------+---------+---------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+--------+---------------+---------+---------+----------------------+---------+---------------------------------+
| 1 | SIMPLE | p1 | ALL | PRIMARY | NULL | NULL | NULL | 3449512 | Using temporary; Using filesort |
| 1 | SIMPLE | links | ref | source,target | source | 5 | cluster.p1.id | 1 | Using where |
| 1 | SIMPLE | p2 | eq_ref | PRIMARY | PRIMARY | 4 | cluster.links.target | 1 | Using where |
+----+-------------+-------+--------+---------------+---------+---------+----------------------+---------+---------------------------------+
3 rows in set (0.04 sec)

Options: ReplyQuote


Subject
Views
Written By
Posted
Cluster crashes on any non trivial query
1923
March 21, 2006 05:00AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.