explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NVES : Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: plan #EsfA; plan #wHXu; plan #n6ew; plan #J86F; plan #mi49; plan #Q9KU; plan #SFTG

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.998 459.886 ↓ 36.9 480 1

Nested Loop (cost=0.55..6,408.13 rows=13 width=523) (actual time=182.513..459.886 rows=480 loops=1)

2. 0.460 456.188 ↓ 36.0 540 1

Nested Loop (cost=0.00..6,273.01 rows=15 width=273) (actual time=182.479..456.188 rows=540 loops=1)

  • Join Filter: ((plist.m_pricelist_id)::text = (prversion.m_pricelist_id)::text)
  • Rows Removed by Join Filter: 3,780
3. 0.022 0.022 ↑ 1.0 27 1

Seq Scan on m_pricelist_version prversion (cost=0.00..2.27 rows=27 width=164) (actual time=0.018..0.022 rows=27 loops=1)

4. 0.271 455.706 ↓ 32.0 160 27

Materialize (cost=0.00..6,268.73 rows=5 width=273) (actual time=2.724..16.878 rows=160 loops=27)

5. 0.062 455.435 ↓ 32.0 160 1

Nested Loop (cost=0.00..6,268.70 rows=5 width=273) (actual time=73.547..455.435 rows=160 loops=1)

6. 0.021 0.021 ↓ 8.0 8 1

Seq Scan on m_pricelist plist (cost=0.00..1.10 rows=1 width=82) (actual time=0.012..0.021 rows=8 loops=1)

  • Filter: (isactive = 'Y'::bpchar)
7. 455.352 455.352 ↓ 4.0 20 8

Seq Scan on m_product prod (cost=0.00..6,267.55 rows=5 width=191) (actual time=49.604..56.919 rows=20 loops=8)

  • Filter: (((value)::text ~~* '%10008%'::text) AND (isgeneric = 'N'::bpchar) AND (isactive = 'Y'::bpchar))
  • Rows Removed by Filter: 55,840
8. 2.700 2.700 ↑ 1.0 1 540

Index Scan using m_productprice_pricelist_ve_un on m_productprice price (cost=0.55..8.57 rows=1 width=109) (actual time=0.005..0.005 rows=1 loops=540)

  • Index Cond: (((m_pricelist_version_id)::text = (prversion.m_pricelist_version_id)::text) AND ((m_product_id)::text = (prod.m_product_id)::text))
Planning time : 3.305 ms
Execution time : 460.133 ms