explain.depesz.com

PostgreSQL's explain analyze made readable

Result: orqG

Settings
# exclusive inclusive rows x rows loops node
1. 0.036 0.219 ↑ 18.1 14 1

Sort (cost=156.52..157.15 rows=254 width=462) (actual time=0.218..0.219 rows=14 loops=1)

  • Sort Key: ps.doc_no DESC, ph.doc_no DESC, gh.doc_no DESC
  • Sort Method: quicksort Memory: 27kB
2. 0.015 0.183 ↑ 18.1 14 1

HashAggregate (cost=141.29..143.83 rows=254 width=462) (actual time=0.181..0.183 rows=14 loops=1)

  • Group Key: ps.doc_no, ps.tgl_doc, ph.doc_no, ph.doc_date, gh.doc_no, gh.doc_date, (NULL::character varying), (NULL::date), tf.no_faktur, u.nama, ('supplier'::text)
3. 0.002 0.168 ↑ 14.1 18 1

Append (cost=70.54..134.31 rows=254 width=462) (actual time=0.115..0.168 rows=18 loops=1)

4. 0.009 0.124 ↑ 9.8 13 1

Hash Left Join (cost=70.54..86.58 rows=127 width=493) (actual time=0.114..0.124 rows=13 loops=1)

  • Hash Cond: ((ph.doc_no)::text = (tf.no_po)::text)
5. 0.008 0.112 ↑ 9.8 13 1

Hash Left Join (cost=59.15..74.71 rows=127 width=367) (actual time=0.105..0.112 rows=13 loops=1)

  • Hash Cond: (pl.id = gl.id_po)
6. 0.005 0.075 ↑ 12.7 10 1

Hash Left Join (cost=45.59..60.45 rows=127 width=309) (actual time=0.069..0.075 rows=10 loops=1)

  • Hash Cond: (ph.id = pl.id_hdr)
7. 0.010 0.061 ↑ 18.1 7 1

Hash Right Join (cost=31.99..45.49 rows=127 width=309) (actual time=0.057..0.061 rows=7 loops=1)

  • Hash Cond: (ph.id_fpb = ps.id)
8. 0.006 0.006 ↑ 38.3 6 1

Seq Scan on po_hdr ph (cost=0.00..12.30 rows=230 width=70) (actual time=0.006..0.006 rows=6 loops=1)

9. 0.002 0.045 ↑ 25.4 5 1

Hash (cost=30.40..30.40 rows=127 width=247) (actual time=0.045..0.045 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 0.007 0.043 ↑ 25.4 5 1

Hash Join (cost=3.19..30.40 rows=127 width=247) (actual time=0.040..0.043 rows=5 loops=1)

  • Hash Cond: (ps.id_unit = u.id)
11. 0.015 0.015 ↑ 170.0 5 1

Seq Scan on permintaan_stok ps (cost=0.00..22.75 rows=850 width=33) (actual time=0.013..0.015 rows=5 loops=1)

  • Filter: ((tgl_doc >= '2019-08-05'::date) AND (tgl_doc <= '2019-09-05'::date))
12. 0.009 0.021 ↑ 1.0 53 1

Hash (cost=2.53..2.53 rows=53 width=222) (actual time=0.021..0.021 rows=53 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
13. 0.012 0.012 ↑ 1.0 53 1

Seq Scan on master_unit u (cost=0.00..2.53 rows=53 width=222) (actual time=0.006..0.012 rows=53 loops=1)

14. 0.002 0.009 ↑ 17.8 9 1

Hash (cost=11.60..11.60 rows=160 width=8) (actual time=0.009..0.009 rows=9 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
15. 0.007 0.007 ↑ 17.8 9 1

Seq Scan on po_ln pl (cost=0.00..11.60 rows=160 width=8) (actual time=0.005..0.007 rows=9 loops=1)

16. 0.003 0.029 ↓ 1.7 12 1

Hash (cost=13.48..13.48 rows=7 width=70) (actual time=0.029..0.029 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
17. 0.011 0.026 ↓ 1.7 12 1

Hash Right Join (cost=1.16..13.48 rows=7 width=70) (actual time=0.021..0.026 rows=12 loops=1)

  • Hash Cond: (gh.id = gl.id_hdr)
18. 0.004 0.004 ↑ 18.8 8 1

Seq Scan on grn_hdr gh (cost=0.00..11.50 rows=150 width=70) (actual time=0.004..0.004 rows=8 loops=1)

19. 0.003 0.011 ↓ 1.7 12 1

Hash (cost=1.07..1.07 rows=7 width=16) (actual time=0.011..0.011 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
20. 0.008 0.008 ↓ 1.7 12 1

Seq Scan on grn_ln gl (cost=0.00..1.07 rows=7 width=16) (actual time=0.006..0.008 rows=12 loops=1)

21. 0.000 0.003 ↓ 0.0 0 1

Hash (cost=11.38..11.38 rows=1 width=116) (actual time=0.003..0.003 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
22. 0.003 0.003 ↓ 0.0 0 1

Seq Scan on tukar_faktur tf (cost=0.00..11.38 rows=1 width=116) (actual time=0.003..0.003 rows=0 loops=1)

  • Filter: ((no_faktur IS NOT NULL) AND ((status_approve)::text = '1'::text))
23. 0.009 0.042 ↑ 25.4 5 1

Hash Right Join (cost=31.99..45.18 rows=127 width=501) (actual time=0.039..0.042 rows=5 loops=1)

  • Hash Cond: (sth.id_fpb = ps_1.id)
24. 0.004 0.004 ↑ 210.0 1 1

Seq Scan on stok_trf_hdr sth (cost=0.00..12.10 rows=210 width=126) (actual time=0.004..0.004 rows=1 loops=1)

25. 0.002 0.029 ↑ 25.4 5 1

Hash (cost=30.40..30.40 rows=127 width=247) (actual time=0.029..0.029 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
26. 0.006 0.027 ↑ 25.4 5 1

Hash Join (cost=3.19..30.40 rows=127 width=247) (actual time=0.025..0.027 rows=5 loops=1)

  • Hash Cond: (ps_1.id_unit = u_1.id)
27. 0.005 0.005 ↑ 170.0 5 1

Seq Scan on permintaan_stok ps_1 (cost=0.00..22.75 rows=850 width=33) (actual time=0.004..0.005 rows=5 loops=1)

  • Filter: ((tgl_doc >= '2019-08-05'::date) AND (tgl_doc <= '2019-09-05'::date))
28. 0.008 0.016 ↑ 1.0 53 1

Hash (cost=2.53..2.53 rows=53 width=222) (actual time=0.016..0.016 rows=53 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
29. 0.008 0.008 ↑ 1.0 53 1

Seq Scan on master_unit u_1 (cost=0.00..2.53 rows=53 width=222) (actual time=0.003..0.008 rows=53 loops=1)

Planning time : 0.801 ms
Execution time : 0.373 ms