Quantcast
Channel: MySQL Forums - NDB clusters
Viewing all articles
Browse latest Browse all 1562

Creating Disk & Memory based tables in cluster (no replies)

$
0
0
Hello,
I am a newbie to MySQL cluster. We have installed MySQL Cluster version 7.2 on a Xen server. The set up is as follows:

==============
Cluster Setup
==============
- 4 Virtual machines created on xen server.
- 4 cluster nodes created - one on each machine
- one manageent node, one MySQL node, two Data nodes.

All the virtual machines have Debian OS
The cluster setup is running fine.

I created cluster "memory" & "disk" tables using the scripts below:

Memory Table
-------------
CREATE TABLE `a2_mem` (
`c1` bigint(20) unsigned NOT NULL STORAGE MEMORY AUTO_INCREMENT,
`c2` varchar(50) STORAGE MEMORY DEFAULT NULL,
PRIMARY KEY (`c1`)
) ENGINE=ndbcluster DEFAULT CHARSET=utf8;


Disk Table
-------------
CREATE TABLE `a2_disk` (
`c1` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`c2` varchar(50) DEFAULT NULL,
PRIMARY KEY (`c1`)
) ENGINE=ndbcluster DEFAULT CHARSET=utf8;


Querries
=========
Q1) Are the above scripts OK to create the required types of table in a cluster using the cluster engine? Is there a better way? If yes,

please specify?

Q2) By default, what are the types of table created in MySQL cluster - disk or memory if no "STORAGE" clause is used? Is there a way to

configure this default option?

Q3) I added around 100,000 rows of data to the table "a2_mem" (memory table). Where is this data getting stored i.e. which data node & how do

I know the file (name) that holds this data?

Q4) Since the data is for a memory table, will this data be always in memory? If "yes" then if I delete a considerable amount of rows (say)

80,000 - then will that show an increase in amount of FREE RAM (for the respective data node machine) than it was previously?

When is this data written to the disks?

Q5) Will the data in a memory table (as above) persist after a restart of cluster or the machines hosting the cluster nodes?

Can anyone please point me to some more examples (apart from the MySQL documentation) that would help me understand the cluster architecture
with proper real life scenarios & examples?

Thanks,
Sachin Vyas.

Viewing all articles
Browse latest Browse all 1562

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>