This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER TABLE dbname.tablename ENGINE=InnoDB; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql > show engines; | |
+--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+ | |
| Engine | Support | Comment | Transactions | XA | Savepoints | | |
+--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+ | |
| InnoDB | DEFAULT | Percona-XtraDB, Supports transactions, row-level locking, and foreign keys | YES | YES | YES | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql > select table_schema, table_name, engine from information_schema.tables where table_schema in ('test_db'); | |
+--------------+------------+--------+ | |
| table_schema | table_name | engine | | |
+--------------+------------+--------+ | |
| test_db | test | InnoDB | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLESPACE <表領域名> | |
[DATAFILE データファイル名 [SIZE ファイルサイズ]] | |
[AUTOEXTEND {OFF | ON NEXT サイズ [MAXSIZE {UNLIMITED | サイズ}]}] | |
[MINIMUM EXTENT エクステントサイズ] | |
[BLOCKSIZE ブロックサイズ] | |
[LOGGING | NOLOGGING] | |
[ONLINE | OFFLINE] | |
[PERMANENT | TEMPORARY] | |
[SEGMENT SPACE MANAGEMENT [MANUAL | AUTO]] | |
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//表領域を8Gで作って、同じサイズのデータファイルをもう一本作るときの例 | |
CREATE TABLESPACE SQLBENCHMARK | |
DATAFILE '+DATA' SIZE 8G | |
AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED | |
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M; | |
ALTER TABLESPACE SQLBENCHMARK ADD DATAFILE '+DATA' SIZE 8G AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SQL> select * from USER_TABLESPACES; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> select table_name,partition_name,tablespace_name,subpartition_count from user_tab_partitions order by table_name,partition_name; | |
// カンマ区切りで出力バージョン | |
> select table_name||','||partition_name||','||tablespace_name||','||subpartition_count from user_tab_partitions order by table_name,partition_name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// テーブルの作成 | |
CREATE TABLE TEST_TABLE ( | |
SELL_YM CHAR(6) NOT NULL, | |
USER_ID VARCHAR2(12) | |
) | |
PARTITION BY LIST (SELL_YM) | |
( | |
PARTITION B201601 VALUES ('201601'), | |
PARTITION B201602 VALUES ('201602'), | |
PARTITION B201603 VALUES ('201603'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ps aux | less | |
RSSと表示されているのがメモリーの使用量(単位はk) | |
RSSとはResident Set Size の略 | |
常駐セット (Resident set) は、「物理メモリーに常駐するページ」のことを指すそうで、 | |
つまりメモリーの使用量とみなしてよい |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(実際に利用可能なメモリ量)≒(MemFree+Inactive) | |
// 無理矢理求めてみる | |
$ echo '利用可能なメモリ量';TMP1=`free | grep 'Mem:' | awk '{print $4}'`;TMP2=`vmstat -a | tail -n 1 | awk '{print $5}'`;TMP3=`expr $TMP1 + $TMP2`;echo $TMP3;echo `expr $TMP3 / 1000`M | |
利用可能なメモリ量 | |
1125732 | |
1125M |
OlderNewer