explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gFlq : Optimization for: plan #BoA9

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.210 1,166.379 ↑ 1.0 76 1

Merge Left Join (cost=212,100.21..215,689.30 rows=76 width=55) (actual time=1,031.670..1,166.379 rows=76 loops=1)

  • Merge Cond: (product_product__product_tmpl_id.id = ir_translation.res_id)
2. 0.083 0.875 ↑ 1.0 76 1

Sort (cost=660.58..660.77 rows=76 width=86) (actual time=0.869..0.875 rows=76 loops=1)

  • Sort Key: product_product.product_tmpl_id
  • Sort Method: quicksort Memory: 36kB
3. 0.078 0.792 ↑ 1.0 76 1

Nested Loop (cost=0.57..658.21 rows=76 width=86) (actual time=0.070..0.792 rows=76 loops=1)

4. 0.410 0.410 ↑ 1.0 76 1

Index Scan using product_product_pkey on product_product (cost=0.29..307.41 rows=76 width=23) (actual time=0.056..0.410 rows=76 loops=1)

  • Index Cond: (id = ANY ('{18842,80384,77057,77570,18948,77061,80405,103193,121755,122396,107037,77086,76828,76827,107041,80671,103338,103215,103216,106802,106803,103218,81015,81016,20158,19007,81017,81018,19911,20294,20297,129662,109003,109002,18893,20298,17487,129663,109521,109522,20299,103124,76885,128086,19031,128087,18904,103003,77147,76892,121694,128094,77406,77405,128098,128227,77412,128228,128229,128230,20300,20296,18794,20295,77566,80373,77302,77303,77304,77305,18678,129659,129660,129661,103294,76799}'::integer[]))
5. 0.304 0.304 ↑ 1.0 1 76

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

  • Index Cond: (id = product_product.product_tmpl_id)
6. 40.375 1,165.294 ↓ 1.4 3,205 1

Unique (cost=211,439.63..214,998.34 rows=2,371 width=77) (actual time=1,030.436..1,165.294 rows=3,205 loops=1)

7. 794.135 1,124.919 ↓ 1.1 757,820 1

Sort (cost=211,439.63..213,218.99 rows=711,742 width=77) (actual time=1,030.434..1,124.919 rows=757,820 loops=1)

  • Sort Key: ir_translation.res_id, ir_translation.id DESC
  • Sort Method: external merge Disk: 46104kB
8. 330.784 330.784 ↓ 1.1 758,004 1

Seq Scan on ir_translation (cost=0.00..79,002.77 rows=711,742 width=77) (actual time=2.308..330.784 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: 866897