MySQL Forums
Forum List  »  Federated Storage Engine

Federated
Posted by: ray pitt
Date: March 28, 2005 07:20PM

Federated Table Type.

I can not find how the Federated Type works, but I have a question on what it is doing. On large tables, 280 million rows and 1.4 GB compressed, doing a "select count(*) from table" dies after a few minutes. It seems to be related to memory and runs as long as memory is free. So the tables sits on server 2 in a MySQL table and server 1 has the federated table type. Server 2 has no problem doing a "select count(*) from table" or even select * from table limit 1" but doing those from server 1 brings 0 as a result. Watching the memory usage the mysql engine uses all real memory then when it runs out dies. It seems to run these, or any commands with no problem on smaller tables, or tables that are smaller then the amout of real memory available

mysql> show table status;
+-----------+-----------+---------+------------+-------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+----------------------------------------------+
| Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment |
+-----------+-----------+---------+------------+-------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+----------------------------------------------+
| abctrans | FEDERATED | 10 | Dynamic | 10000 | 0 | 0 | 0 | 0 | 0 | NULL | NULL | NULL | NULL | latin1_swedish_ci | NULL | | mysql://root@192.168.0.94/realtime1/abctrans |
| abctrans1 | MyISAM | 10 | Dynamic | 1456 | 132 | 192768 | 4294967295 | 18432 | 0 | NULL | 2005-03-24 19:28:48 | 2005-03-28 16:18:13 | NULL | latin1_swedish_ci | NULL | | |
| derog | FEDERATED | 10 | Fixed | 10000 | 0 | 0 | 0 | 0 | 0 | NULL | NULL | NULL | NULL | latin1_swedish_ci | NULL | | mysql://user1@192.168.3.208:3306/derog/derog |
+-----------+-----------+---------+------------+-------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+----------------------------------------------+
3 rows in set (0.04 sec)

mysql> select count(*) from abctrans;
+----------+
| count(*) |
+----------+
| 6552 |
+----------+
1 row in set (0.28 sec)

mysql> select count(*) from derog;
ERROR 5 (HY000): Out of memory (Needed 3175796 bytes)
mysql> select count(*) from derog;
ERROR 1219 (HY000): Error running query on master: Lost connection to MySQL server during query

[root@develop1 root]# /usr/local/mysql/bin/mysql -Cq realtime1
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 13 to server version: 5.0.3-beta-nightly-20050324

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> select count(*) from derog;
+-----------------------+
| count(*) |
+-----------------------+
+-----------------------+
0 rows in set (2 min 44.33 sec)

mysql> select count(*) from derog;
+-----------------------+
| count(*) |
+-----------------------+
+-----------------------+
0 rows in set (0.00 sec)

-rw-r--r-- 1 mysql mysql 8848 Feb 20 16:09 derog.frm
-rw-r--r-- 1 mysql mysql 1452617737 Feb 28 19:12 derog.MYD
-rw-r--r-- 1 mysql mysql 933811200 Feb 28 19:14 derog.MYI
.

Options: ReplyQuote


Subject
Views
Written By
Posted
Federated
6769
March 28, 2005 07:20PM
3340
April 18, 2005 06:58PM
3069
May 17, 2005 01:01PM
3466
May 22, 2005 05:59PM
2991
May 24, 2005 05:51AM
3019
May 25, 2005 12:32PM
3144
August 19, 2005 09:27AM
3202
September 27, 2005 11:29AM


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.