• MySQL関連のWikiへのリンク
    • MySQL
    • MySQL 5.1
    • MySQL 5.4
    • MySQL/InnoDB
    • MySQL/エラー
    • MySQL/クラスタリング
    • MySQL/サーバ移動
    • MySQL/チューニング
    • MySQL/バージョン
    • MySQL/バックアップ
    • MySQL/プロファイリング
    • MySQL/ベンチマーク
    • MySQL/レプリケーション
    • MySQL/ロック

各バージョンの比較

MySQL 4.1.x

MySQL 5.0.x

  • SQL 2003 準拠のストアドプロシージャ、ストアドファンクションを実装
  • トリガーを実装
  • ビューを実装
  • サーバサイドカーソル機能を実装
  • 情報スキーマを実装
  • XA 分散・トランザクションの実装
  • 日本語キャラクタセット cp932 / eucjpms に対応 => 機種依存文字もOK!

比較表

ver.charset日本語日本語(機種依存文字)mysqlbench (MyISAM)mysqlbench (innodb)
4.0.26ujis100100
4.1.18ujis×9095
4.1.18cp9329095
5.0.19eucjpms7513
※ mysqlbenchは4.0.26を100としたときの数字

各バージョンのパフォーマンス

ベンチマークテスト mysqlbench

インストール

使用方法

  • MyISAM のテスト
    ./mysqlbench -i -U [user] -P [password] -E myisam test
    ./mysqlbench -U [user] -P [password] -E myisam test -c 10 -t 100
  • InnoDB のテスト
    ./mysqlbench -i -U [user] -P [password] -E innodb test
    ./mysqlbench -U [user] -P [password] -E innodb test -c 10 -t 100

MySQL 4.0

  • テスト環境
    • CPU:Pentium III (Coppermine) 1GHz x 2
    • RAM:2GB
    • HDD:IDE 20GB
  • /etc/my.cnf
    [mysqld]
    port            = 3306
    socket          = /tmp/mysql.sock
    skip-locking
    key_buffer = 16M 
    max_allowed_packet = 1M
    table_cache = 64
    sort_buffer_size = 512K
    net_buffer_length = 8K
    myisam_sort_buffer_size = 8M
    default-character-set=ujis
       :
    innodb_buffer_pool_size = 1024M
    innodb_additional_mem_pool_size = 128M
  • MyISAMのベンチマークテスト結果
    transaction type                    . . . : TPC-B (sort of)
    scaling factor                      . . . : 1
    number of clients                     . . : 10
    number of transactions per client         : 100
    number of transactions actually processed : 1000/1000
    tps (include connections establishing)  . : 1050.883793
    tps (exclude connections establishing)  . : 1060.362177
  • InnoDBのベンチマークテスト結果
    transaction type                    . . . : TPC-B (sort of)
    scaling factor                      . . . : 1
    number of clients                     . . : 10
    number of transactions per client         : 100
    number of transactions actually processed : 1000/1000
    tps (include connections establishing)  . : 666.529362
    tps (exclude connections establishing)  . : 671.839833

MySQL 4.1

  • テスト環境
    • CPU:Pentium III (Coppermine) 1GHz x 2
    • RAM:2GB
    • HDD:IDE 20GB
  • /etc/my.cnf
    [mysqld]
    port            = 3306
    socket          = /tmp/mysql.sock
    skip-locking
    key_buffer = 16M
    max_allowed_packet = 1M
    table_cache = 64
    sort_buffer_size = 512K
    net_buffer_length = 8K
    read_buffer_size = 256K
    read_rnd_buffer_size = 512K
    myisam_sort_buffer_size = 8M
    
    skip-character-set-client-handshake
    default-character-set=ujis
    init-connect=SET NAMES ujis
       :
    innodb_buffer_pool_size = 1024M
    innodb_additional_mem_pool_size = 128M
  • MyISAMのベンチマークテスト結果
    transaction type                    . . . : TPC-B (sort of)
    scaling factor                      . . . : 1
    number of clients                     . . : 10
    number of transactions per client         : 100
    number of transactions actually processed : 1000/1000
    tps (include connections establishing)  . : 948.542517
    tps (exclude connections establishing)  . : 957.649851
  • InnoDBのベンチマークテスト結果
    transaction type                    . . . : TPC-B (sort of)
    scaling factor                      . . . : 1
    number of clients                     . . : 10
    number of transactions per client         : 100
    number of transactions actually processed : 1000/1000
    tps (include connections establishing)  . : 633.153032
    tps (exclude connections establishing)  . : 637.083077

MySQL 5.0

  • テスト環境
    • CPU:Pentium III (Coppermine) 1GHz x 2
    • RAM:2GB
    • HDD:IDE 20GB
  • /etc/my.cnf
    [mysqld]
    port            = 3306
    socket          = /tmp/mysql.sock
    skip-locking
    key_buffer = 16M
    max_allowed_packet = 1M
    table_cache = 64
    sort_buffer_size = 512K
    net_buffer_length = 8K
    read_buffer_size = 256K
    read_rnd_buffer_size = 512K
    myisam_sort_buffer_size = 8M
    
    skip-character-set-client-handshake
    default-character-set=eucjpms
    init-connect=SET NAMES eucjpms
       :
    innodb_buffer_pool_size = 1024M
    innodb_additional_mem_pool_size = 128M
  • MyISAMのベンチマークテスト結果
    transaction type                    . . . : TPC-B (sort of)
    scaling factor                      . . . : 1
    number of clients                     . . : 10
    number of transactions per client         : 100
    number of transactions actually processed : 1000/1000
    tps (include connections establishing)  . : 783.276729
    tps (exclude connections establishing)  . : 787.649653
  • InnoDBのベンチマークテスト結果
    transaction type                    . . . : TPC-B (sort of)
    scaling factor                      . . . : 1
    number of clients                     . . : 10
    number of transactions per client         : 100
    number of transactions actually processed : 1000/1000
    tps (include connections establishing)  . : 80.727015
    tps (exclude connections establishing)  . : 80.771510

参考URL

各バージョンの動作検証

※ 空欄は未検証

MySQL 4.0

OSインストール方法インストール起動日本語備考
RHEL 3.0rpm過去のプロジェクトで確認済み
RHEL 4.0rpmデータベースtest上にテーブルを作成し、phpMyAdmin?で操作
Windows 2003 ServerインストーラUSENプロジェクトで確認済み
Mac OS XdmgINNプロジェクトで確認済み

MySQL 4.1

OSインストール方法インストール起動日本語備考
RHEL 3.0rpm
RHEL 4.0rpmデータベースtest上にテーブルを作成し、phpMyAdmin?で操作。機種依存文字が文字化けする
Windows 2003 Serverインストーラ
Mac OS Xdmg

MySQL 5.0

OSインストール方法インストール起動日本語備考
RHEL 3.0rpm
RHEL 4.0rpmデータベースtest上にテーブルを作成し、phpMyAdmin?で操作
Windows 2003 Serverインストーラ
Mac OS Xdmg

各バージョンの設定

MySQL 4.0

MySQL 4.1

1. /etc/my.cnf の下記該当部分を追記

[mysqld]
default-character-set=ujis
init-connect=SET NAMES ujis
[mysqld-4.1]
old-passwords
 
[mysqldump]
default-character-set=ujis

[mysql]
default-character-set=ujis

2. MySQLを再起動

3. mysql ログインし、下記SQLを実行し、結果を確認。

mysql> show variables like 'char%';

+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | ujis                       |
| character_set_connection | ujis                       |
| character_set_database   | ujis                       |
| character_set_results    | ujis                       |
| character_set_server     | ujis                       |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+

MySQL 5.0

1. /etc/my.cnf の下記該当部分を追記

[mysqld]
default-character-set=eucjpms
init-connect=SET NAMES eucjpms
[mysqld-5.0]
old-passwords
 
[mysqldump]
default-character-set=eucjpms

[mysql]
default-character-set=eucjpms

2. MySQLを再起動

3. mysql ログインし、下記SQLを実行し、結果を確認。

mysql> show variables like 'char%';

+--------------------------+----------------------------+
| Variable_name            | Value                      | 
+--------------------------+----------------------------+
| character_set_client     | eucjpms                    |
| character_set_connection | eucjpms                    |
| character_set_database   | eucjpms                    |
| character_set_filesystem | binary                     |
| character_set_results    | eucjpms                    |
| character_set_server     | eucjpms                    |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+

トップ   編集 凍結解除 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2017-04-09 (日) 20:46:59 (2574d)