mysql:4566
From: "cecil syskai" <"cecil syskai" <syskai_1@xxxxxxxxxx>>
Date: Fri, 26 Oct 2001 13:04:23 +0900
Subject: [mysql 04566] £Ò£Á£É£Äµ¡Ç½¤Ë¤Ä¤¤¤Æ¡Ê¥Æ¥¹¥È·ë²Ì¡Ë
cecil syskai" <syskai_1@xxxxxxxxxx> ³ô¥»¥·¡¼¥ë ¥·¥¹¥Æ¥à³«È¯¼¼ ¤Ç¤¹¡£ ¿ÜÆ£¡¡ÍÍ fujiyama¡¡ÍÍ »Ö¼¡÷¤Ä¤ß¤¥½¥Õ¥È¥¦¥§¥¢¡¡ÍÍ ¤È¤ß¤¿¡¡ÍÍ ±»ô@ÉÙ»ÎÄ̸¦µæ½ê¡¡ÍÍ fujiyama¡¡ÍÍ ¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤·¤¿¡£ ¡ã¡ã¡ã Mysql ¤Î raid µ¡Ç½¤Ë¤Ä¤¤¤Æ¤Î¥Æ¥¹¥È·ë²Ì¡ä¡ä¡ä +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ÌÜŪ¡§ £±£°¡Á£²£°£Ç£Â¤Î¥Æ¡¼¥Ö¥ë¤òºîÀ®¤¹¤ëɬÍפ¬¤¢¤ê¡¢linux ¤Î£²£Ç£Â¤ÎÊɤò±Û¤¨¤ë¤¿¤á¡¢£Ò£Á£É£Äµ¡Ç½¤ò¥Æ¥¹¥È¡£ £Ï£Ó¡§ Redhat7.1 linux ¥Þ¥·¡¼¥ó¡§ IBM netfinity 7100 ¥Ï¡¼¥É RAID 5 ¥á¥â¥ê 3GB ÍÆÎÌ Ìó 170GB Mysql:3-23-43 ·ëÏÀ¤È·ë²Ì¡§ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ¡Redhat7.1 (linux ¥«¡¼¥Í¥ë 2.4 ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à ext2) ¤Ë¤ª¤¤¤Æ¤Ï¡¢£²£Ç£Â¤ÎÊɤϤʤ¯¡¢Ã±°ì¥Õ¥¡¥¤¥ë¡Ê repl_tbl.MYD) ¤Ç£²£Ç£Â¤ò±Û¤¨¤ë¥Æ¡¼¥Ö¥ëºîÀ®¤¬¤Ç¤¤ë¡£ ¡ÊLFS ? Æü·Ð£Ì£é£î£õ£ø£±£°·î¡Ë ¥Æ¡¼¥Ö¥ë (repl_tbl) ¤òºî¤ê¡¢¤½¤ÎºÝ max_rows ¤Ë 60000000 ¤ò»ØÄê¡££²£´£´¥Ð¥¤¥È ¤Î ¥ì¥³¡¼¥É¤ò 34999999 ·ï½ñ¤¹þ¤ß¤ò¹Ô¤Ã¤¿¡£¡Ê sql:insert) ¤½¤Î·ë²Ì¡¢ 8539999756 ¥Ð¥¤¥È¤Î¥Æ¡¼¥Ö¥ë¤òºîÀ® | repl_tbl | MyISAM | Dynamic | 34999999 | 244 | 8539999756 | 28 1474976710655 | 358131712 | 0 | NULL | 2001-10-26 08:46:13 | 2001-10-26 11:42:37 | NULL | max_rows=60000000 [ repldb]# ls -l ¹ç·× 30921204 drwx------ 2 mysql mysql 4096 10·î 25 08:42 00 drwx------ 2 mysql mysql 4096 10·î 25 08:42 01 drwx------ 2 mysql mysql 4096 10·î 25 08:42 02 drwx------ 2 mysql mysql 4096 10·î 25 08:42 03 drwx------ 2 mysql mysql 4096 10·î 25 08:42 04 drwx------ 2 mysql mysql 4096 10·î 25 08:42 05 drwx------ 2 mysql mysql 4096 10·î 25 08:42 06 drwx------ 2 mysql mysql 4096 10·î 25 08:42 07 drwx------ 2 mysql mysql 4096 10·î 25 08:42 08 drwx------ 2 mysql mysql 4096 10·î 25 08:42 09 -rw-rw-rw- 1 mysql mysql 21768888655 10·î 25 18:07 repl_out.txt -rw-rw---- 1 mysql mysql 8539999756 10·î 26 11:42 repl_tbl.MYD -rw-rw---- 1 mysql mysql 358131712 10·î 26 11:42 repl_tbl.MYI -rw-rw---- 1 mysql mysql 8590 10·î 26 08:46 repl_tbl.frm -rw-rw---- 1 mysql mysql 965206016 10·î 25 20:14 repl_tbl2.MYI -rw-rw---- 1 mysql mysql 8590 10·î 25 08:42 repl_tbl2.frm | | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ¢ mysql ¤Î RAID µ¡Ç½¤Ï½½Ê¬»ÈÍѤǤ¤ë¤È»×¤ï¤ì¤ë¡£ £±£°Ê¬³ä¡Ê¥¹¥È¥é¥¤¥Ô¥ó¥°¡Ë¤µ¤ì¤¿¥Æ¡¼¥Ö¥ë¤òºî¤ê¡¢¤½¤ÎºÝ max_rows ¤Ë 60000000 ¤ò»ØÄê¡££²£´£´¥Ð¥¤¥È¤Î¥ì¥³¡¼¥É¤òÌó£¹£°£°£°Ëü·ï½ñ¤¹þ ¤ß¤ò¹Ô¤Ã¤¿¡£¡Ê sql:insert) £±Ê¬³ä¥Õ¥¡¥¤¥ë¤´¤ÈÌ󣲡¥£±£¹£¶£Ç£Â¤Î¥Õ¥¡¥¤¥ë¡Ê repl_tbl2.MYD) ¤¬ ¤Ç¤¡¢¥È¡¼¥¿¥ë 21959999756 ¥Ð¥¤¥È¤Î¥Æ¡¼¥Ö¥ë¤È¤Ê¤Ã¤¿¡£ ¡Ê max_rows=60000000 ¤È»ØÄꤷ¤Æ¤â¡¢£¶£°£°£°Ëü·ï¤Ç½ñ¤¹þ¤ßÃæ»ß¤È ¤Ï¤Ê¤é¤Ê¤«¤Ã¤¿¡Ë mysql> show table status; | Name | Type | Row_format | Rows | Avg_row_length | Data_length | Ma x_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Create_options | Comment | | repl_tbl2 | MyISAM | Dynamic | 89999999 | 244 | 21959999756 | 28 1474976710655 | 965206016 | 0 | NULL | 2001-10-25 18:13:53 | 2001-10-25 20:14:41 | NULL | max_rows=60000000 raid_type=striped raid_ch unks=10 raid_chunksize=10 | | Max_data_length=281474976710655 £²£¸£±£Ç£Â¡©¡© ¤³¤Î¥Æ¡¼¥Ö¥ë¤Ë ¡¦´Êñ¤Ê select Áàºî ¡¦¥Æ¥¥¹¥È¤ËÅǤ½Ð¤·¡¢Ì᤹Áàºî ¡¦´Êñ¤Ê select Áàºî ¤ò¹Ô¤Ã¤¿¤¬¡¢ÆäËÌäÂê¤Ï¤Ê¤«¤Ã¤¿¡£ ============================= | repl_tbl2 | MyISAM | Dynamic | 89999999 | 244 | 21959999756 | 28 1474976710655 | 965206016 | 0 | NULL | 2001-10-25 08:42:47 | 2001-10-25 14:41:29 | NULL | max_rows=60000000 raid_type=striped raid_ch unks=10 raid_chunksize=10 | | mysql> select count(*) from repl_tbl2; +----------+ | count(*) | +----------+ | 89999999 | +----------+ # cd /s01/repldb/00 # ls -l -rw-rw---- 1 mysql mysql 2196008960 10·î 25 14:41 repl_tbl2.MYD # cd ..;cd 01;ls -l -rw-rw---- 1 mysql mysql 2196001036 10·î 25 14:41 repl_tbl2.MYD # cd ..;cd 02;ls -l -rw-rw---- 1 mysql mysql 2195998720 10·î 25 14:41 repl_tbl2.MYD # cd ..;cd 03;ls -l -rw-rw---- 1 mysql mysql 2195998720 10·î 25 14:41 repl_tbl2.MYD # cd ..;cd 04;ls -l -rw-rw---- 1 mysql mysql 2195998720 10·î 25 14:41 repl_tbl2.MYD # cd ..;cd 05;ls -l -rw-rw---- 1 mysql mysql 2195998720 10·î 25 14:41 repl_tbl2.MYD # cd ..;cd 06;ls -l -rw-rw---- 1 mysql mysql 2195998720 10·î 25 14:41 repl_tbl2.MYD # cd ..;cd 07;ls -l -rw-rw---- 1 mysql mysql 2195998720 10·î 25 14:41 repl_tbl2.MYD # cd ..;cd 08;ls -l -rw-rw---- 1 mysql mysql 2195998720 10·î 25 14:41 repl_tbl2.MYD # cd ..;cd 09;ls -l -rw-rw---- 1 mysql mysql 2195998720 10·î 25 14:41 repl_tbl2.MYD mysql> select * into outfile 'repl_out.txt' from repl_tbl2; Query OK, 89999999 rows affected (1 hour 41 min 3.08 sec) drwx------ 2 mysql mysql 4096 10·î 25 08:42 00 drwx------ 2 mysql mysql 4096 10·î 25 08:42 01 drwx------ 2 mysql mysql 4096 10·î 25 08:42 02 drwx------ 2 mysql mysql 4096 10·î 25 08:42 03 drwx------ 2 mysql mysql 4096 10·î 25 08:42 04 drwx------ 2 mysql mysql 4096 10·î 25 08:42 05 drwx------ 2 mysql mysql 4096 10·î 25 08:42 06 drwx------ 2 mysql mysql 4096 10·î 25 08:42 07 drwx------ 2 mysql mysql 4096 10·î 25 08:42 08 drwx------ 2 mysql mysql 4096 10·î 25 08:42 09 ¡ã¡ã¥Æ¥¥¹¥ÈÌó£²£±¡¥£·£Ç£Â¡ä¡ä -rw-rw-rw- 1 mysql mysql 21768888655 10·î 25 18:07 repl_out.txt -rw-rw---- 1 mysql mysql 965206016 10·î 25 14:41 repl_tbl2.MYI -rw-rw---- 1 mysql mysql 8590 10·î 25 08:42 repl_tbl2.frm # df Filesystem 1k-blocks Used Available Use% Mounted on /dev/sda1 8064400 1677312 5977440 22% / /dev/sda5 164864672 48029636 108460392 31% /s01 # head repl_out.txt 1 MMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBbbMMMMMMMMMMMMMMMMMMMMMMMMM MMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMmmmmmmmmmmmmmmmmmmmmmmmmmMM MMMM # tail repl_out.txt 89999999 MMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBbbMMMMMMMMMMMMMMMMM MMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMmmmmmmmmmmmmmmmmmmm mmmm mmMMMMMM ============================= mysql> delete from repl_tbl2; ¡ã¡ã¥ì¥³¡¼¥Éºï½ü¡ä¡ä Query OK, 0 rows affected (33.66 sec) # ls -l ¹ç·× 21279528 drwx------ 2 mysql mysql 4096 10·î 25 08:42 00 drwx------ 2 mysql mysql 4096 10·î 25 08:42 01 drwx------ 2 mysql mysql 4096 10·î 25 08:42 02 drwx------ 2 mysql mysql 4096 10·î 25 08:42 03 drwx------ 2 mysql mysql 4096 10·î 25 08:42 04 drwx------ 2 mysql mysql 4096 10·î 25 08:42 05 drwx------ 2 mysql mysql 4096 10·î 25 08:42 06 drwx------ 2 mysql mysql 4096 10·î 25 08:42 07 drwx------ 2 mysql mysql 4096 10·î 25 08:42 08 drwx------ 2 mysql mysql 4096 10·î 25 08:42 09 -rw-rw-rw- 1 mysql mysql 21768888655 10·î 25 18:07 repl_out.txt -rw-rw---- 1 mysql mysql 0 10·î 25 18:13 repl_tbl2.MYI -rw-rw---- 1 mysql mysql 8590 10·î 25 08:42 repl_tbl2.frm [ 00]# ls -l ¹ç·× 0 -rw-rw---- 1 mysql mysql 0 10·î 25 18:14 repl_tbl2.MYD [ 00]# cd ..;cd 01;ls -l ¹ç·× 0 -rw-rw---- 1 mysql mysql 0 10·î 25 18:14 repl_tbl2.MYD [ 01]# cd ..;cd 02;ls -l ¹ç·× 0 -rw-rw---- 1 mysql mysql 0 10·î 25 18:14 repl_tbl2.MYD [ 02]# cd ..;cd 09;ls -l ¹ç·× 0 -rw-rw---- 1 mysql mysql 0 10·î 25 18:13 repl_tbl2.MYD [ 09]# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/sda1 8064400 1677312 5977440 22% / /dev/sda5 164864672 25619592 130870436 17% /s01 ============================= mysql> load data infile 'repl_out.txt' replace into table repl_tbl2; Query OK, 89999999 rows affected (1 hour 57 min 34.07 sec) -rw-rw---- 1 mysql mysql 2196008960 10·î 25 20:14 repl_tbl2.MYD [ 00]# cd ..;cd 01;ls -l -rw-rw---- 1 mysql mysql 2196001036 10·î 25 20:14 repl_tbl2.MYD [ 01]# cd ..;cd 02;ls -l -rw-rw---- 1 mysql mysql 2195998720 10·î 25 20:14 repl_tbl2.MYD [ 02]# cd ..;cd 03;ls -l -rw-rw---- 1 mysql mysql 2195998720 10·î 25 20:14 repl_tbl2.MYD [ 08]# cd ..;cd 09;ls -l -rw-rw---- 1 mysql mysql 2195998720 10·î 25 20:14 repl_tbl2.MYD | repl_tbl2 | MyISAM | Dynamic | 89999999 | 244 | 21959999756 | 28 1474976710655 | 965206016 | 0 | NULL | 2001-10-25 18:13:53 | 2001-10-25 20:14:41 | NULL | max_rows=60000000 raid_type=striped raid_ch unks=10 raid_chunksize=10 | | mysql> select * from repl_tbl2 where repl_key=89999999; | repl_key | repl_c | 89999999 | MMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBbbMMMMMMMMMMMMMMMMMMMM MMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMmmmmmmmmmmmmmmmmmmmmmm mmmM MMMMM | 1 row in set (0.00 sec) mysql> select * from repl_tbl2 where repl_key=90000000; Empty set (0.00 sec) mysql> select count(*) from repl_tbl2; +----------+ | count(*) | +----------+ | 89999999 | +----------+ 1 row in set (0.00 sec) +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ¡ã¡ã¥Ç¡¼¥¿½ñ¤¹þ¤ß£Ð£Ç¡§£Ð£Å£Ò£Ì¤Î£Ð£Ç¡ä¡ä #!/usr/bin/perl ######################################################### ### repl200 ######################################################### $|=1; use DBI; #use Getopt::Long; #@opt=GetOptions("no:s"); #$nno=$opt_no || die "$0 -no nno\n"; $dbname="repldb"; $hostname="localhost"; $data_s="DBI:mysql:$dbname:$hostname"; $uname="root"; $pwd=""; ############### main ########################################################### ####### ($gfsec1,$gfmin1,$gfhour1)=(localtime)[0,1,2]; #print "$gfhour1:$gfmin1:$gfsec1\n"; $dbh=DBI->connect($data_s, $uname, $pwd) || die "mysql repldb ERR"; $sss=$dbh->tables(); #print ":::rows=$DBI::rows\n"; #print "No=$nno $sss\n"; ##goto MMM; $cnt=$cnt2=0; for ($idx=1; $idx < 90000000;$idx++) { $cnt++; $cnt2++; ##print "idx=$idx\n"; if ($cnt2 > 99999) { print "No=$nno cnt=$cnt\n"; $cnt2=0; ($gfsec2,$gfmin2,$gfhour2)=(localtime)[0,1,2]; print "$gfhour1:$gfmin1:$gfsec1\n"; print "$gfhour2:$gfmin2:$gfsec2\n"; } ##$rr=int( rand(999999) ); $statement="insert into repl_tbl2 set repl_c=\'MMAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBB BBBB BBBBBBBBBBBBBBBBbbMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMM MMMMMMMMMMMMMMMMmmmmmmmmmmmmmmmmmmmmmmmmmMMMMMM\',repl_key=$idx"; $sth=$dbh->prepare($statement) or &print_error("¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤· ¤¿¡£(p repare)"); $rv=$sth->execute or &print_error("¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿¡£(SQL EXECUTE.select koza)"); ###$dbh->commit; ##sleep 10; } $sth->finish; MMM: $dbh->disconnect; ($gfsec2,$gfmin2,$gfhour2)=(localtime)[0,1,2]; print "$gfhour1:$gfmin1:$gfsec1\n"; print "$gfhour2:$gfmin2:$gfsec2\n"; exit; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ¡ã¡ã max_rows ¤ò»ØÄꤷ¤Ê¤¤¤È¤¤Î¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¡ä¡ä No= cnt=17600000 13:6:46 15:12:5 DBD::mysql::st execute failed: The table 'RRR_tbl' is full at rrr200.pl line 45. Undefined subroutine &main::print_error called at rrr200.pl line 45.