explain.depesz.com

PostgreSQL's explain analyze made readable

Result: P4IH : Optimization for: plan #Hbk4

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.187 1,194.856 ↑ 1.0 1 1

Merge Left Join (cost=217,087.12..220,797.39 rows=1 width=55) (actual time=1,194.855..1,194.856 rows=1 loops=1)

  • Merge Cond: (product_product__product_tmpl_id.id = ir_translation.res_id)
2. 0.030 0.058 ↑ 1.0 1 1

Sort (cost=16.62..16.62 rows=1 width=86) (actual time=0.058..0.058 rows=1 loops=1)

  • Sort Key: product_product.product_tmpl_id
  • Sort Method: quicksort Memory: 25kB
3. 0.004 0.028 ↑ 1.0 1 1

Nested Loop (cost=0.57..16.61 rows=1 width=86) (actual time=0.027..0.028 rows=1 loops=1)

4. 0.015 0.015 ↑ 1.0 1 1

Index Scan using product_product_pkey on product_product (cost=0.29..8.30 rows=1 width=23) (actual time=0.014..0.015 rows=1 loops=1)

  • Index Cond: (id = 120913)
5. 0.009 0.009 ↑ 1.0 1 1

Index Scan using product_template_pkey on product_template product_product__product_tmpl_id (cost=0.28..8.30 rows=1 width=63) (actual time=0.009..0.009 rows=1 loops=1)

  • Index Cond: (id = product_product.product_tmpl_id)
6. 38.527 1,194.611 ↓ 1.3 3,198 1

Unique (cost=217,070.50..220,751.12 rows=2,371 width=77) (actual time=1,051.126..1,194.611 rows=3,198 loops=1)

7. 816.103 1,156.084 ↓ 1.0 757,686 1

Sort (cost=217,070.50..218,910.81 rows=736,123 width=77) (actual time=1,051.125..1,156.084 rows=757,686 loops=1)

  • Sort Key: ir_translation.res_id, ir_translation.id DESC
  • Sort Method: external merge Disk: 46072kB
8. 339.981 339.981 ↓ 1.0 758,004 1

Seq Scan on ir_translation (cost=0.00..79,914.84 rows=736,123 width=77) (actual time=0.026..339.981 rows=758,004 loops=1)

  • Filter: ((value <> ''::text) AND ((name)::text = 'product.template,name'::text) AND ((lang)::text = 'es_MX'::text))
  • Rows Removed by Filter: 922558