自分用に要約メモ。 詳しい記事は引用先をみてくださいな。 @see なぜ、SQLは重たくなるのか? —『SQLパフォーマンス詳解』の翻訳者が教える原因と対策 ORMが自動生成するSQLを確認する 通常はSELECT+JOIN句で処理できるSQL対して、N+1問題が発生していないか。 10記事取得するSQLで、 記事取得で終わるSQL一発が、記事取得1+各記事 …
タグ: DBチューニング
MySQL 5.6 ファイルディスクリプタ カーネルチューニング CentOS7
MySQL5.6 ファイルディスクリプタチューニング CentOS7 [Warning] Buffered warning: Could not increase number of max_open_files to more than 1024 (request: 10140) [Warning] Buffered warning: Changed limits: max_con …
MySQLTuner CentOS7
MySQLTunerインストール
1 2 3 4 5 |
# wget -O /usr/local/src/MySQLTuner.zip https://github.com/rackerhacker/MySQLTuner-perl/archive/master.zip # unzip /usr/local/src/MySQLTuner.zip -d /usr/local/src/ # rm -f /usr/local/src/MySQLTuner.zip |
実行
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# /usr/local/src/MySQLTuner-perl-master/mysqltuner.pl -user root >> MySQLTuner 1.7.9 - Major Hayden <major@mhtx.net> >> Bug reports, feature requests, and downloads at http://mysqltuner.com/ >> Run with '--help' for additional options and output filtering [--] Skipped version check for MySQLTuner script [!!] Attempted to use login credentials, but they were invalid [root@localhost MySQLTuner-perl-master]# /usr/local/src/MySQLTuner-perl-master/mysqltuner.pl >> MySQLTuner 1.7.9 - Major Hayden <major@mhtx.net> >> Bug reports, feature requests, and downloads at http://mysqltuner.com/ >> Run with '--help' for additional options and output filtering [--] Skipped version check for MySQLTuner script Please enter your MySQL administrative login: root Please enter your MySQL administrative password:※パスワード入力 [OK] Currently running supported MySQL version 5.7.22-log [OK] Operating on 64-bit architecture (略) |
設定例 LAMP環境 CentOS7 MySQL5.7 メモリ32GB ストレージエンジン:InnoDB [crayon-6004 …
PostgreSQL チューニング pgtune
チューニングツール pgtune https://pgtune.leopard.in.ua/#/ 条件 CPU: 8 メモリ: 16GB バージョン: 9.6 最大接続数: 9999 アプリケーション:WEBアプリケーション チューニング例 [crayon-60048e8edc64c772390484 …
MySQLのクエリチューニング、アーキテクチャとか メモ
チューニング MySQLでのSQLチューニングについて(EXPLAINの見方) @see http://labs.opentone.co.jp/?p=1985 partitions: partition構成のテーブルの場合に、その処理がアクセスしているpartitionを表す。 テーブルをパーティショニングしている場合に見る。 …