explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Mxjx

Settings
# exclusive inclusive rows x rows loops node
1. 0.022 204.095 ↑ 530.0 1 1

Sort (cost=2,283.55..2,284.88 rows=530 width=59) (actual time=204.094..204.095 rows=1 loops=1)

  • Sort Key: mpv.isactive DESC, mpv.validfrom DESC
  • Sort Method: quicksort Memory: 25kB
  • rows=248 loops=1)
2. 0.091 204.073 ↑ 530.0 1 1

Nested Loop (cost=112.26..2,259.57 rows=530 width=59) (actual time=6.053..204.073 rows=1 loops=1)

3. 0.022 2.042 ↑ 1.0 1 1

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

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

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

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

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

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

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

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

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

  • Index Cond: (c_taxcategory_id = tx.c_taxcategory_id)
  • Heap Fetches: 1
9. 0.008 201.940 ↑ 373.0 1 1

Nested Loop Left Join (cost=109.60..2,109.35 rows=373 width=61) (actual time=3.970..201.940 rows=1 loops=1)

10. 0.007 201.882 ↑ 373.0 1 1

Nested Loop (cost=108.54..1,704.65 rows=373 width=29) (actual time=3.914..201.882 rows=1 loops=1)

11. 0.012 0.054 ↑ 1.0 1 1

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

12. 0.032 0.032 ↑ 1.0 1 1

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

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

  • Index Cond: (c_currency_id = mpl.c_currency_id)
14. 199.980 201.821 ↑ 373.0 1 1

Hash Join (cost=108.40..1,697.36 rows=373 width=29) (actual time=3.867..201.821 rows=1 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..1580.45 rows=1423 width=20) (actual time=1.982..199.151
  • Index Cond: (m_product_id = '1115846'::numeric)
15. 0.520 1.841 ↑ 1.0 712 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 52kB
16. 1.321 1.321 ↑ 1.0 712 1

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

  • Filter: (m_pricelist_id = '1000001'::numeric)
  • Rows Removed by Filter: 2003
17. 0.002 0.050 ↓ 0.0 0 1

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

  • Filter: ((uomc.m_product_id = '1115846'::numeric) AND (uomc.m_product_id = mpp.m_product_id))
18. 0.001 0.048 ↓ 0.0 0 1

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

19. 0.036 0.047 ↓ 0.0 0 1

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

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

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

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