explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KPbx

Settings
# exclusive inclusive rows x rows loops node
1. 617.152 671.740 ↑ 1.1 2,656 1

Nested Loop Left Join (cost=2,118.11..19,389.64 rows=2,820 width=2,280) (actual time=20.378..671.740 rows=2,656 loops=1)

2. 2.330 51.932 ↑ 1.1 2,656 1

Hash Left Join (cost=2,117.82..13,410.55 rows=2,820 width=1,964) (actual time=19.984..51.932 rows=2,656 loops=1)

  • Hash Cond: (i.cof_payfrom_location_id = pfl.c_bpartner_location_id)
3. 2.880 42.443 ↑ 1.1 2,656 1

Nested Loop Left Join (cost=1,086.78..12,372.10 rows=2,820 width=1,958) (actual time=12.810..42.443 rows=2,656 loops=1)

4. 3.471 36.907 ↑ 1.1 2,656 1

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

5. 2.819 30.780 ↑ 1.1 2,656 1

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

6. 2.362 22.649 ↑ 1.1 2,656 1

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

  • Hash Cond: (i.c_bpartner_location_id = bpl.c_bpartner_location_id)
7. 1.331 8.052 ↑ 1.1 2,656 1

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

8. 0.009 0.009 ↑ 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.008..0.009 rows=1 loops=1)

  • Index Cond: (c_bpartner_id = '5005922'::numeric)
9. 4.011 6.712 ↑ 1.1 2,656 1

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

  • Hash Cond: (i.c_doctype_id = d.c_doctype_id)
10. 2.320 2.611 ↑ 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.438..2.611 rows=2,656 loops=1)

  • Recheck Cond: (c_bpartner_id = '5005922'::numeric)
  • Heap Blocks: exact=1249
11. 0.291 0.291 ↑ 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.291..0.291 rows=2,674 loops=1)

  • Index Cond: (c_bpartner_id = '5005922'::numeric)
12. 0.039 0.090 ↑ 1.0 209 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
13. 0.051 0.051 ↑ 1.0 209 1

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

14. 6.592 12.235 ↓ 1.0 21,615 1

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

  • Buckets: 32768 Batches: 1 Memory Usage: 3258kB
15. 5.643 5.643 ↓ 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..5.643 rows=21,615 loops=1)

16. 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)
17. 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)
18. 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)
19. 2.981 7.159 ↓ 1.0 21,615 1

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

  • Buckets: 32768 Batches: 1 Memory Usage: 1227kB
20. 4.178 4.178 ↓ 1.0 21,615 1

Seq Scan on c_bpartner_location pfl (cost=0.00..761.02 rows=21,602 width=12) (actual time=0.002..4.178 rows=21,615 loops=1)

21. 2.656 2.656 ↑ 1.0 1 2,656

Index Scan using c_location_pkey on c_location locc (cost=0.29..0.34 rows=1 width=136) (actual time=0.001..0.001 rows=1 loops=2,656)

  • Index Cond: (pfl.c_location_id = c_location_id)