2017-02-25 17 views
0

私はpgAdmin 4でpostgresqlを作成しています。私はいくつかのクエリパフォーマンスの最適化をしようとしています。 EXPLAIN ANALYZE(または)EXPLAIN(VERBOSE TRUE)を使用してクエリを実行すると、次のスクリーンショットに示す「データ出力」が表示されます。EXPLAINデータのエクスポート方法pgAdminからの出力4

QUERY PLAN 
-------------------------------------------------------------------------------------------------------------- 
Sort (cost=29.71..29.73 rows=6 width=64) (actual time=0.189..16.233 rows=7 loops=1) 
    Sort Key: books.title 
    -> Nested Loop (cost=0.00..29.63 rows=6 width=64) (actual time=0.068..0.129 rows=7 loops=1) 
     -> Index Scan using authors_pkey on authors (cost=0.00..5.82 rows=1 width=36) (actual time=0.029..0.033 rows=1 loops=1) 
       Index Cond: (id = 16) 
     -> Seq Scan on books (cost=0.00..23.75 rows=6 width=36) (actual time=0.026..0.052 rows=7 loops=1) 
       Filter: (author_id = 16) 
Total runtime: 16.386 ms 

答えて

0

使用ビルトインにpgAdmin4のオプションを説明します。私はhttp://explain.depesz.comに入力ができる、この形式でANALYZE(または私の現在の「データ出力リレー」をエクスポートする)EXPLAINのための出力を取得する方法 enter image description here

あなたの望む出力を得る。

enter image description here

そして今、あなたは、 'データのouputを' タブからの出力をコピーすることができます。

+0

実際に出力ファイルに何が入っているか確認しましたか? – klin

+0

ああ、私の悪い.. :(答えを更新しました。 – n33rma

関連する問題