2017-02-25 7 views
0

저는 postgresql에서 pgAdmin 4를 사용하고 있습니다. 일부 쿼리 성능 최적화를 시도하고 있습니다. EXPLAIN ANALYZE (또는) EXPLAIN (VERBOSE TRUE)을 사용하여 쿼리를 실행하면 다음과 같은 '데이터 출력'이 표시됩니다. enter image description hereEXPLAIN 데이터를 내보내는 방법 pgAdmin에서 출력 4

ANALYZE EXPLAIN (또는 내 현재 '데이터 OUPUT을'수출) 나는 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 

답변

0

사용 내장가 pgAdmin4의 옵션을 설명 원하는 출력을 얻으십시오.

enter image description here

그리고 지금 당신은 탭 'OUPUT 데이터'의 출력을 복사 할 수 있습니다.

+0

출력 파일에 실제로 무엇이 있는지 확인 했습니까? – klin

+0

오, 내 나쁜 .. :(답변을 업데이 트했습니다. – n33rma