2017-02-25 6 views
0

Ich arbeite an postgresql, mit pgAdmin 4. Ich versuche einige Optimierungen der Abfrageleistung durchzuführen. Wenn ich eine Abfrage mit EXPLAIN ANALYSE (oder) EXPLAIN (VERBOSE TRUE) führe, wird die 'Datenausgabe', die ich sehe, im folgenden Screenshot gezeigt. enter image description hereSo exportieren Sie EXPLAIN-Daten Ausgabe von pgAdmin 4

Wie Ausgabe erhalten für ANALYZE ERKLäREN (oder meine aktuell 'Data Ouput' exportieren) in diesem Format, die ich eingegeben in http://explain.depesz.com:

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 

Antwort

0

Verwendung Einbau-erklären-Option von pgAdmin4 zu Holen Sie sich Ihre gewünschte Ausgabe.

enter image description here

Und nun können Sie die Ausgabe von 'Data ouput' Register kopieren.

+0

Haben Sie überprüft, was Sie wirklich in der Ausgabedatei haben? – klin

+0

Oh, mein Schlechter .. :(, aktualisierte die Antwort. – n33rma

Verwandte Themen