MySQL/テーブルのストレージエンジン一覧を表示する方法
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
#navi(../)
* テーブルのストレージエンジン一覧を表示する方法 [#ed5778...
テーブルごとに指定できるストレージエンジンの一覧を表示す...
#contents
#htmlinsertpcsp(db-top.html,db-sp.html)
* 関連資料 [#f0b7e92d]
-[[ストレージエンジンを指定してテーブルを作成する>MySQL/...
-[[デフォルトのストレージエンジンをInnoDBにする方法>MySQL...
* show table statusで一覧を表示する [#ef804468]
show table statusでストレージエンジン一覧を表示することが...
以下にデータベースを作成しInnoDB, MyISAMのテーブルを1つず...
** データベースとテーブルを作成 [#ma4c983c]
$ mysql -u root -p -s
Enter password:
mysql> create database db1;
mysql> use db1
mysql> create table t1 (a int, b int) engine innodb;
mysql> create table t2 (a int, b int) engine myisam;
** show table statusを使用 [#xda94b6f]
mysql> use db1
mysql> show table status;
Name Engine Version Row_format Rows Avg_row_...
t1 InnoDB 10 Compact 0 0 16384 ...
t2 MyISAM 10 Fixed 0 0 0 ...
テーブルの各種情報が表示されEngineの部分を見ればストレー...
しかしこれでは見にくいので\Gを使用して縦表示にしてみます。
** show table status \G を使用 [#aad0d6fc]
縦に表示(\G)により少し見やすくなりました。
mysql> show table status \G
*************************** 1. row *********************...
Name: t1
Engine: InnoDB
Version: 10
Row_format: Compact
Rows: 0
Avg_row_length: 0
Data_length: 16384
Max_data_length: 0
Index_length: 0
Data_free: 4194304
Auto_increment: NULL
Create_time: 2012-10-01 16:57:19
Update_time: NULL
Check_time: NULL
Collation: utf8_general_ci
Checksum: NULL
Create_options:
Comment:
*************************** 2. row *********************...
Name: t2
Engine: MyISAM
Version: 10
Row_format: Fixed
Rows: 0
Avg_row_length: 0
Data_length: 0
Max_data_length: 2533274790395903
Index_length: 1024
Data_free: 0
Auto_increment: NULL
Create_time: 2012-10-01 16:57:27
Update_time: 2012-10-01 16:57:27
Check_time: NULL
Collation: utf8_general_ci
Checksum: NULL
Create_options:
Comment:
* SELECTを使ってinformation_schemaから情報をストレージエ...
この方法がストレージエンジンを調べるときに一番見やすいと...
- 構文
select table_name, engine from information_schema.table...
- 実行結果
mysql> select table_name, engine from information_schem...
+------------+--------+
| table_name | engine |
+------------+--------+
| t1 | InnoDB |
| t2 | MyISAM |
+------------+--------+
2 rows in set (0.00 sec)
#htmlinsertpcsp(db-btm.html,db-sp.html)
終了行:
#navi(../)
* テーブルのストレージエンジン一覧を表示する方法 [#ed5778...
テーブルごとに指定できるストレージエンジンの一覧を表示す...
#contents
#htmlinsertpcsp(db-top.html,db-sp.html)
* 関連資料 [#f0b7e92d]
-[[ストレージエンジンを指定してテーブルを作成する>MySQL/...
-[[デフォルトのストレージエンジンをInnoDBにする方法>MySQL...
* show table statusで一覧を表示する [#ef804468]
show table statusでストレージエンジン一覧を表示することが...
以下にデータベースを作成しInnoDB, MyISAMのテーブルを1つず...
** データベースとテーブルを作成 [#ma4c983c]
$ mysql -u root -p -s
Enter password:
mysql> create database db1;
mysql> use db1
mysql> create table t1 (a int, b int) engine innodb;
mysql> create table t2 (a int, b int) engine myisam;
** show table statusを使用 [#xda94b6f]
mysql> use db1
mysql> show table status;
Name Engine Version Row_format Rows Avg_row_...
t1 InnoDB 10 Compact 0 0 16384 ...
t2 MyISAM 10 Fixed 0 0 0 ...
テーブルの各種情報が表示されEngineの部分を見ればストレー...
しかしこれでは見にくいので\Gを使用して縦表示にしてみます。
** show table status \G を使用 [#aad0d6fc]
縦に表示(\G)により少し見やすくなりました。
mysql> show table status \G
*************************** 1. row *********************...
Name: t1
Engine: InnoDB
Version: 10
Row_format: Compact
Rows: 0
Avg_row_length: 0
Data_length: 16384
Max_data_length: 0
Index_length: 0
Data_free: 4194304
Auto_increment: NULL
Create_time: 2012-10-01 16:57:19
Update_time: NULL
Check_time: NULL
Collation: utf8_general_ci
Checksum: NULL
Create_options:
Comment:
*************************** 2. row *********************...
Name: t2
Engine: MyISAM
Version: 10
Row_format: Fixed
Rows: 0
Avg_row_length: 0
Data_length: 0
Max_data_length: 2533274790395903
Index_length: 1024
Data_free: 0
Auto_increment: NULL
Create_time: 2012-10-01 16:57:27
Update_time: 2012-10-01 16:57:27
Check_time: NULL
Collation: utf8_general_ci
Checksum: NULL
Create_options:
Comment:
* SELECTを使ってinformation_schemaから情報をストレージエ...
この方法がストレージエンジンを調べるときに一番見やすいと...
- 構文
select table_name, engine from information_schema.table...
- 実行結果
mysql> select table_name, engine from information_schem...
+------------+--------+
| table_name | engine |
+------------+--------+
| t1 | InnoDB |
| t2 | MyISAM |
+------------+--------+
2 rows in set (0.00 sec)
#htmlinsertpcsp(db-btm.html,db-sp.html)
ページ名: