explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yJ67

Settings
# exclusive inclusive rows x rows loops node
1. 619.359 656.589 ↑ 1.1 2,656 1

Nested Loop Left Join (cost=1,086.78..17,398.75 rows=2,820 width=2,150) (actual time=9.991..656.589 rows=2,656 loops=1)

2. 3.629 34.574 ↑ 1.1 2,656 1

Nested Loop Left Join (cost=1,086.49..8,444.30 rows=2,820 width=1,948) (actual time=9.634..34.574 rows=2,656 loops=1)

3. 2.924 28.289 ↑ 1.1 2,656 1

Nested Loop (cost=1,086.20..4,726.35 rows=2,820 width=1,932) (actual time=9.630..28.289 rows=2,656 loops=1)

4. 2.550 20.053 ↑ 1.1 2,656 1

Hash Join (cost=1,085.91..3,773.92 rows=2,820 width=1,772) (actual time=9.622..20.053 rows=2,656 loops=1)

  • Hash Cond: (i.c_bpartner_location_id = bpl.c_bpartner_location_id)
5. 1.352 8.276 ↑ 1.1 2,656 1

Nested Loop (cost=54.87..2,735.47 rows=2,820 width=1,652) (actual time=0.383..8.276 rows=2,656 loops=1)

6. 0.007 0.007 ↑ 1.0 1 1

Index Scan using c_bpartner_pkey on c_bpartner b (cost=0.29..2.51 rows=1 width=1,124) (actual time=0.006..0.007 rows=1 loops=1)

  • Index Cond: (c_bpartner_id = '5005922'::numeric)
7. 4.118 6.917 ↑ 1.1 2,656 1

Hash Join (cost=54.58..2,704.77 rows=2,820 width=534) (actual time=0.374..6.917 rows=2,656 loops=1)

  • Hash Cond: (i.c_doctype_id = d.c_doctype_id)
8. 2.532 2.734 ↑ 1.1 2,656 1

Bitmap Heap Scan on c_invoice i (cost=39.88..2,682.52 rows=2,820 width=530) (actual time=0.304..2.734 rows=2,656 loops=1)

  • Recheck Cond: (c_bpartner_id = '5005922'::numeric)
  • Heap Blocks: exact=1249
9. 0.202 0.202 ↑ 1.1 2,674 1

Bitmap Index Scan on c_invoice_documentno_target (cost=0.00..39.17 rows=2,820 width=0) (actual time=0.202..0.202 rows=2,674 loops=1)

  • Index Cond: (c_bpartner_id = '5005922'::numeric)
10. 0.027 0.065 ↑ 1.0 209 1

Hash (cost=12.09..12.09 rows=209 width=10) (actual time=0.065..0.065 rows=209 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
11. 0.038 0.038 ↑ 1.0 209 1

Seq Scan on c_doctype d (cost=0.00..12.09 rows=209 width=10) (actual time=0.002..0.038 rows=209 loops=1)

12. 4.902 9.227 ↓ 1.0 21,615 1

Hash (cost=761.02..761.02 rows=21,602 width=126) (actual time=9.227..9.227 rows=21,615 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 3258kB
13. 4.325 4.325 ↓ 1.0 21,615 1

Seq Scan on c_bpartner_location bpl (cost=0.00..761.02 rows=21,602 width=126) (actual time=0.002..4.325 rows=21,615 loops=1)

14. 5.312 5.312 ↑ 1.0 1 2,656

Index Scan using c_location_pkey on c_location loc (cost=0.29..0.34 rows=1 width=166) (actual time=0.002..0.002 rows=1 loops=2,656)

  • Index Cond: (c_location_id = bpl.c_location_id)
15. 2.656 2.656 ↓ 0.0 0 2,656

Index Scan using idx_lbr_docfiscal_c_invoice_id on lbr_docfiscal df (cost=0.29..1.31 rows=1 width=22) (actual time=0.001..0.001 rows=0 loops=2,656)

  • Index Cond: (i.c_invoice_id = c_invoice_id)
16. 2.656 2.656 ↓ 0.0 0 2,656

Index Scan using c_order_pkey on c_order o (cost=0.29..1.39 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=2,656)

  • Index Cond: (i.c_order_id = c_order_id)