explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TiGm

Settings
# exclusive inclusive rows x rows loops node
1. 0.175 1,047.945 ↓ 21.0 21 1

Nested Loop Left Join (cost=50,860.64..69,781.52 rows=1 width=1,387) (actual time=1,047.731..1,047.945 rows=21 loops=1)

  • Join Filter: (cl.m_product_classification_id = il.m_product_classification_id)
  • Rows Removed by Join Filter: 987
2. 0.011 1,047.728 ↓ 21.0 21 1

Nested Loop Left Join (cost=50,860.64..69,779.05 rows=1 width=664) (actual time=1,047.684..1,047.728 rows=21 loops=1)

  • Join Filter: (il.m_product_id = po.m_product_id)
3. 50.936 1,047.675 ↓ 21.0 21 1

Hash Right Join (cost=50,860.22..69,770.60 rows=1 width=647) (actual time=1,047.666..1,047.675 rows=21 loops=1)

  • Hash Cond: (cd1.m_inoutline_id = il.m_inoutline_id)
4. 812.834 864.875 ↓ 1.0 676,068 1

HashAggregate (cost=40,747.69..50,613.98 rows=657,752 width=70) (actual time=519.347..864.875 rows=676,068 loops=1)

  • Group Key: cd1.m_inoutline_id
5. 52.041 52.041 ↓ 1.0 824,353 1

Seq Scan on m_costdetail cd1 (cost=0.00..34,566.54 rows=824,154 width=18) (actual time=0.009..52.041 rows=824,353 loops=1)

6. 0.015 131.864 ↓ 21.0 21 1

Hash (cost=10,112.51..10,112.51 rows=1 width=583) (actual time=131.864..131.864 rows=21 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 15kB
7. 10.883 131.849 ↓ 21.0 21 1

Hash Right Join (cost=6,155.13..10,112.51 rows=1 width=583) (actual time=131.841..131.849 rows=21 loops=1)

  • Hash Cond: (inv.c_invoiceline_id = il.c_invoiceline_id)
8. 108.948 119.744 ↓ 1.0 150,931 1

HashAggregate (cost=6,000.77..7,885.24 rows=150,757 width=38) (actual time=78.346..119.744 rows=150,931 loops=1)

  • Group Key: inv.c_invoiceline_id
9. 10.796 10.796 ↓ 1.0 151,118 1

Seq Scan on m_matchinv inv (cost=0.00..5,245.85 rows=150,985 width=11) (actual time=0.006..10.796 rows=151,118 loops=1)

10. 0.025 1.222 ↓ 21.0 21 1

Hash (cost=154.34..154.34 rows=1 width=551) (actual time=1.222..1.222 rows=21 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 15kB
11. 0.009 1.197 ↓ 21.0 21 1

Nested Loop Left Join (cost=2.69..154.34 rows=1 width=551) (actual time=0.124..1.197 rows=21 loops=1)

12. 0.024 1.125 ↓ 21.0 21 1

Nested Loop Left Join (cost=2.27..145.90 rows=1 width=409) (actual time=0.117..1.125 rows=21 loops=1)

  • Join Filter: (il.m_product_id = p.m_product_id)
13. 0.027 1.038 ↓ 21.0 21 1

Nested Loop Left Join (cost=1.85..137.45 rows=1 width=358) (actual time=0.106..1.038 rows=21 loops=1)

14. 0.020 0.990 ↓ 21.0 21 1

Nested Loop Left Join (cost=1.71..137.29 rows=1 width=360) (actual time=0.100..0.990 rows=21 loops=1)

15. 0.022 0.907 ↓ 21.0 21 1

Nested Loop (cost=1.42..136.87 rows=1 width=348) (actual time=0.090..0.907 rows=21 loops=1)

16. 0.023 0.822 ↓ 21.0 21 1

Nested Loop (cost=1.13..136.01 rows=1 width=349) (actual time=0.082..0.822 rows=21 loops=1)

17. 0.045 0.736 ↓ 21.0 21 1

Nested Loop (cost=0.85..134.87 rows=1 width=336) (actual time=0.072..0.736 rows=21 loops=1)

18. 0.167 0.167 ↓ 131.0 131 1

Index Scan using c_invoiceline_product on c_invoiceline il (cost=0.42..126.41 rows=1 width=264) (actual time=0.023..0.167 rows=131 loops=1)

  • Index Cond: (m_product_id = '1780325'::numeric)
  • Filter: (ad_client_id = '1000057'::numeric)
19. 0.524 0.524 ↓ 0.0 0 131

Index Scan using c_invoice_key on c_invoice i (cost=0.42..8.45 rows=1 width=78) (actual time=0.004..0.004 rows=0 loops=131)

  • Index Cond: (c_invoice_id = il.c_invoice_id)
  • Filter: ((dateinvoiced > '2020-08-01 00:00:00'::timestamp without time zone) AND (dateinvoiced < '2020-08-30 00:00:00'::timestamp without time zone))
  • Rows Removed by Filter: 1
20. 0.063 0.063 ↑ 1.0 1 21

Index Scan using c_bpartner_pkey on c_bpartner bp (cost=0.29..1.15 rows=1 width=19) (actual time=0.003..0.003 rows=1 loops=21)

  • Index Cond: (c_bpartner_id = i.c_bpartner_id)
21. 0.063 0.063 ↑ 1.0 1 21

Index Scan using c_bpartner_location_pkey on c_bpartner_location cbpl (cost=0.29..0.86 rows=1 width=12) (actual time=0.003..0.003 rows=1 loops=21)

  • Index Cond: (c_bpartner_location_id = i.c_bpartner_location_id)
22. 0.063 0.063 ↑ 1.0 1 21

Index Scan using c_location_pkey on c_location bpl (cost=0.29..0.41 rows=1 width=24) (actual time=0.003..0.003 rows=1 loops=21)

  • Index Cond: (c_location_id = cbpl.c_location_id)
23. 0.021 0.021 ↑ 1.0 1 21

Index Scan using c_country_pkey on c_country country (cost=0.14..0.16 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=21)

  • Index Cond: (c_country_id = bpl.c_country_id)
24. 0.063 0.063 ↑ 1.0 1 21

Index Scan using m_product_idx3 on m_product p (cost=0.42..8.44 rows=1 width=57) (actual time=0.003..0.003 rows=1 loops=21)

  • Index Cond: (m_product_id = '1780325'::numeric)
25. 0.063 0.063 ↑ 1.0 1 21

Index Scan using m_attributesetinstance_idx1 on m_attributesetinstance pasi (cost=0.42..8.44 rows=1 width=148) (actual time=0.003..0.003 rows=1 loops=21)

  • Index Cond: (m_attributesetinstance_id = il.m_attributesetinstance_id)
26. 0.042 0.042 ↓ 0.0 0 21

Index Scan using m_product_po_idx2 on m_product_po po (cost=0.42..8.44 rows=1 width=23) (actual time=0.002..0.002 rows=0 loops=21)

  • Index Cond: (m_product_id = '1780325'::numeric)
  • Filter: (iscurrentvendor = 'Y'::bpchar)
27. 0.042 0.042 ↑ 1.0 47 21

Seq Scan on m_product_classification cl (cost=0.00..1.47 rows=47 width=19) (actual time=0.001..0.002 rows=47 loops=21)

Planning time : 3.439 ms