explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iHL

Settings
# exclusive inclusive rows x rows loops node
1. 0.106 184.468 ↑ 4.5 14 1

Sort (cost=371.21..371.37 rows=63 width=59) (actual time=184.462..184.468 rows=14 loops=1)

  • Sort Key: mpv.isactive DESC, mpv.validfrom DESC
  • Sort Method: quicksort Memory: 26kB
2. 11.984 184.362 ↑ 4.5 14 1

Nested Loop (cost=112.26..369.33 rows=63 width=59) (actual time=27.961..184.362 rows=14 loops=1)

3. 0.024 11.211 ↑ 1.0 1 1

Nested Loop (cost=2.66..6.04 rows=1 width=12) (actual time=11.149..11.211 rows=1 loops=1)

  • Join Filter: (mp.c_taxcategory_id = tc.c_taxcategory_id)
4. 0.053 11.083 ↑ 1.0 1 1

Hash Join (cost=2.52..5.76 rows=1 width=24) (actual time=11.026..11.083 rows=1 loops=1)

  • Hash Cond: (tx.c_taxcategory_id = mp.c_taxcategory_id)
5. 10.952 10.952 ↓ 1.0 31 1

Seq Scan on c_tax tx (cost=0.00..3.11 rows=30 width=11) (actual time=10.878..10.952 rows=31 loops=1)

  • Filter: (isdefault = 'Y'::bpchar)
  • Rows Removed by Filter: 59
6. 0.014 0.078 ↑ 1.0 1 1

Hash (cost=2.51..2.51 rows=1 width=13) (actual time=0.078..0.078 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
7. 0.064 0.064 ↑ 1.0 1 1

Index Scan using m_product_pkey on m_product mp (cost=0.29..2.51 rows=1 width=13) (actual time=0.063..0.064 rows=1 loops=1)

  • Index Cond: (m_product_id = '1050047'::numeric)
8. 0.104 0.104 ↑ 1.0 1 1

Index Only Scan using c_taxcategory_pkey on c_taxcategory tc (cost=0.14..0.27 rows=1 width=16) (actual time=0.101..0.104 rows=1 loops=1)

  • Index Cond: (c_taxcategory_id = tx.c_taxcategory_id)
  • Heap Fetches: 1
9. 0.062 161.167 ↑ 3.1 14 1

Nested Loop Left Join (cost=109.60..346.16 rows=44 width=61) (actual time=5.048..161.167 rows=14 loops=1)

10. 0.024 160.783 ↑ 3.1 14 1

Nested Loop (cost=108.54..298.42 rows=44 width=29) (actual time=4.962..160.783 rows=14 loops=1)

11. 0.012 0.048 ↑ 1.0 1 1

Nested Loop (cost=0.14..3.56 rows=1 width=12) (actual time=0.036..0.048 rows=1 loops=1)

12. 0.024 0.024 ↑ 1.0 1 1

Seq Scan on m_pricelist mpl (cost=0.00..1.19 rows=1 width=13) (actual time=0.016..0.024 rows=1 loops=1)

  • Filter: (m_pricelist_id = '1000001'::numeric)
  • Rows Removed by Filter: 14
13. 0.012 0.012 ↑ 1.0 1 1

Index Scan using c_currency_pkey on c_currency cr (cost=0.14..2.36 rows=1 width=9) (actual time=0.009..0.012 rows=1 loops=1)

  • Index Cond: (c_currency_id = mpl.c_currency_id)
14. 0.621 160.711 ↑ 3.1 14 1

Hash Join (cost=108.40..294.42 rows=44 width=29) (actual time=4.921..160.711 rows=14 loops=1)

  • Hash Cond: (mpp.m_pricelist_version_id = mpv.m_pricelist_version_id)
15. 158.136 158.136 ↓ 1.6 262 1

Index Scan using m_productprice_pkey on m_productprice mpp (cost=0.56..185.52 rows=166 width=20) (actual time=2.927..158.136 rows=262 loops=1)

  • Index Cond: (m_product_id = '1050047'::numeric)
16. 0.457 1.954 ↑ 1.0 712 1

Hash (cost=98.94..98.94 rows=712 width=23) (actual time=1.954..1.954 rows=712 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 52kB
17. 1.497 1.497 ↑ 1.0 712 1

Seq Scan on m_pricelist_version mpv (cost=0.00..98.94 rows=712 width=23) (actual time=0.030..1.497 rows=712 loops=1)

  • Filter: (m_pricelist_id = '1000001'::numeric)
  • Rows Removed by Filter: 2003
18. 0.014 0.322 ↓ 0.0 0 14

Subquery Scan on uomc (cost=1.05..1.07 rows=1 width=48) (actual time=0.023..0.023 rows=0 loops=14)

  • Filter: ((uomc.m_product_id = '1050047'::numeric) AND (uomc.m_product_id = mpp.m_product_id))
19. 0.042 0.308 ↓ 0.0 0 14

Limit (cost=1.05..1.06 rows=1 width=48) (actual time=0.022..0.022 rows=0 loops=14)

20. 0.182 0.266 ↓ 0.0 0 14

Sort (cost=1.05..1.06 rows=1 width=48) (actual time=0.019..0.019 rows=0 loops=14)

  • Sort Key: c_uom_conversion.dividerate DESC
  • Sort Method: quicksort Memory: 25kB
21. 0.084 0.084 ↓ 0.0 0 14

Seq Scan on c_uom_conversion (cost=0.00..1.04 rows=1 width=48) (actual time=0.006..0.006 rows=0 loops=14)

  • Filter: ((isactive = 'Y'::bpchar) AND (m_product_id = mpp.m_product_id))
  • Rows Removed by Filter: 3