以前、MySQLを高速化する10の方法という投稿で「EXPLAINの見方についてはいずれ解説しようと思う」と書いてしまったので、今日はその公約?を果たそうと思う。 MySQLのチューニングで最も大切なのは、クエリとスキーマの最適化である。スキーマの設計は一度決めてしまうとそのテーブルを利用する全てのクエリに影響してしまうためなかなか変更することは出来ないが、クエリはそのクエリだけを書き直せば良いので変更の敷居は低い。そして遅いクエリをなくすことは、性能を大幅に向上させるための最も有効な手段である。従って、アプリケーションの性能を向上させたいなら、まず最初にクエリのチューニングを検討するべきなのである。 最適化するべきクエリはスロークエリログやクエリアナライザで見付けられるが、ではそのようなクエリが見つかった場合にはどのように最適化すればいいのか?そのためにはまず現在どのようにクエリが実行さ
5. How to profile your MySQL? ● dstat -apr ● 他のサーバーと比べる時に便利 ● SET GLOBAL する時は一緒に流しておく ● 定常値的なものを把握するのに ● カーネルによっては -r 使えない ● iostat -mx ● await, svctm あたり ● I/O なのかそれ以外なのか…というあたり ● top -iH -p `pidof mysqld` ● 見るのは State くらい ● "f"=> "J"(CPU 番号 ), "P"(SWAP) 6. How to profile your MySQL? ● perf top -p `pidof mysqld` ● 役に立ったことはないけど紳士のたしなみ ● pt-ioprofile --cell sizes --run-time 10 ● どのファイルに対して I/O したか見
下記のようなシステムでパフォーマンスが良さげな SQLite を使用予定ですが、もっと速いものが無いか確認のため他のデータベースのパフォーマンスを計測してみました。SQL 利用前提ですが、NoSQL が圧倒的な性能を出す場合は検討する必要があるので KVS も確認しました。 データ件数は 1 億件程度、JDBC SQL 利用可能 INSERT、UPDATE はバッチ SELECT は主キーアクセス性能を重視 将来スケールアウトのための分散はありえるが、スタンドアロンで遅いのはだめ データベースのパフォーマンス比較 計測したデータベース データベース名 タイプ 形態 評判 計測についての備考 SQLite RDB 組み込み ※2 おもちゃ、Android標準 JDBC操作 ※1 H2 RDB 組み込み ※2 組み込み最速 JDBC操作 ※1 Derby RDB 組み込み ※2 Java標準で
平素よりQA@ITをご利用いただき、誠にありがとうございます。 QA@ITは「質問や回答を『共有』し『編集』していくことでベストなQAを蓄積できる、ITエンジニアのための問題解決コミュニティー」として約7年間運営をしてきました。これまでサービスを続けることができたのは、QA@ITのコンセプトに共感をいただき、適切な質問や回答をお寄せいただいた皆さまのご支援があったからこそと考えております。重ねて御礼申し上げます。 しかしながら、エンジニアの情報入手方法の多様化やQAサービス市場の状況、@ITの今後のメディア運営方針などを検討した結果、2020年2月28日(金)15:00をもちましてQA@ITのサービスを終了することにしました。 これまでご利用をいただきました皆さまには残念なお知らせとなり、誠に心苦しく思っております。何とぞ、ご理解をいただけますと幸いです。 QA@ITの7年間で皆さまの知識
JavaScriptなどのスクリプト言語は動作が遅く、最適なパフォーマンスを得るにはC/C++で実装しなければならないという常識に挑んだ先進的な講演が話題になっています。この話題の発端は2012年10月7日から10月8日までベルリンで開催されたJSConf.euでFelix Geisendörfer氏が行った講演です。 彼の講演の題材はnode.jsからMySQLに接続する為のバインディングのパフォーマンスに着目しています。2010年当時、node.jsにはMySQLのバインディングが存在しておらず、増井さん作のnode-mysqlモジュールが開発中の状態でした。このモジュールはJavaScriptでバイナリを解析しておりJavaScriptのみで開発されていました。この状況を受けてFelix氏が新たにnode-mysqlモジュールを新規に開発を始めました。このモジュールもJavaScri
こんにちは、keiです。 今回は、MySQLのチューニングに大活躍な「Jet Profiler」というツールをご紹介します。 Jet Profilerとは Jet Profilerは、MySQL向けのクエリアナライザです。 クエリチューニングは、DBパフォーマンスチューニングの中でも重要な作業の1つですが、 Jet Profilerを使えば、その作業をGUIで直感的に行うことができます。 フリーウェアの形態で提供されており、機能限定版であれば無料で利用することができます。 購入する場合は、$499となります。 詳細情報、ダウンロードは公式ページからどうぞ。 http://www.jetprofiler.com/ja/ Jet Profilerの魅力 その1 導入のしやすさ 通常のWindowマシンに、普通のアプリケーションをインストールする感覚でインストールが可能です。 イン
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く