explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7QWy

Settings
# exclusive inclusive rows x rows loops node
1. 0.130 2,831.205 ↑ 4.1 14 1

Sort (cost=354.31..354.46 rows=58 width=59) (actual time=2,831.198..2,831.205 rows=14 loops=1)

  • Sort Key: mpv.isactive DESC, mpv.validfrom DESC
  • Sort Method: quicksort Memory: 26kB
  • rows=258 loops=1)
2. 1.942 2,831.075 ↑ 4.1 14 1

Nested Loop (cost=110.03..352.61 rows=58 width=59) (actual time=67.101..2,831.075 rows=14 loops=1)

3. 0.043 46.927 ↑ 1.0 1 1

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

  • Join Filter: (mp.c_taxcategory_id = tc.c_taxcategory_id)
4. 0.060 15.496 ↑ 1.0 1 1

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

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

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

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
7. 0.068 0.068 ↑ 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.067..0.068 rows=1 loops=1)

  • Index Cond: (m_product_id = '1050047'::numeric)
8. 31.388 31.388 ↑ 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=31.386..31.388 rows=1 loops=1)

  • Index Cond: (c_taxcategory_id = tx.c_taxcategory_id)
  • Heap Fetches: 1
9. 0.083 2,782.206 ↑ 2.9 14 1

Nested Loop Left Join (cost=107.37..330.80 rows=41 width=61) (actual time=18.780..2,782.206 rows=14 loops=1)

10. 0.034 2,781.521 ↑ 2.9 14 1

Nested Loop (cost=106.32..286.31 rows=41 width=29) (actual time=18.681..2,781.521 rows=14 loops=1)

11. 0.014 0.068 ↑ 1.0 1 1

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

12. 0.038 0.038 ↑ 1.0 1 1

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

  • Filter: (m_pricelist_id = '1000001'::numeric)
  • Rows Removed by Filter: 14
13. 0.016 0.016 ↑ 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.014..0.016 rows=1 loops=1)

  • Index Cond: (c_currency_id = mpl.c_currency_id)
14. 2,779.335 2,781.419 ↑ 2.9 14 1

Hash Join (cost=106.17..282.34 rows=41 width=29) (actual time=18.621..2,781.419 rows=14 loops=1)

  • Hash Cond: (mpp.m_pricelist_version_id = mpv.m_pricelist_version_id)
  • -> Index Scan using m_productprice_pkey on m_productprice mpp (cost=0.56..175.73 rows=157 width=20) (actual time=16.493..2778.006
  • Index Cond: (m_product_id = '1050047'::numeric)
15. 0.479 2.084 ↓ 1.0 710 1

Hash (cost=96.75..96.75 rows=709 width=23) (actual time=2.084..2.084 rows=710 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 51kB
16. 1.605 1.605 ↓ 1.0 710 1

Seq Scan on m_pricelist_version mpv (cost=0.00..96.75 rows=709 width=23) (actual time=0.032..1.605 rows=710 loops=1)

  • Filter: (m_pricelist_id = '1000001'::numeric)
  • Rows Removed by Filter: 1995
17. 0.042 0.602 ↓ 0.0 0 14

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

  • Filter: ((uomc.m_product_id = '1050047'::numeric) AND (uomc.m_product_id = mpp.m_product_id))
18. 0.070 0.560 ↓ 0.0 0 14

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

19. 0.336 0.490 ↓ 0.0 0 14

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

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

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

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