explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AbHa

Settings
# exclusive inclusive rows x rows loops node
1. 0.014 2,109.949 ↑ 1.0 8 1

Limit (cost=146,293.53..146,293.55 rows=8 width=5) (actual time=2,109.937..2,109.949 rows=8 loops=1)

2. 0.100 2,109.935 ↑ 20,109.6 8 1

Sort (cost=146,293.53..146,695.72 rows=160,877 width=5) (actual time=2,109.934..2,109.935 rows=8 loops=1)

  • Sort Key: (COALESCE(product_product.coreassortment, false)) DESC
  • Sort Method: top-N heapsort Memory: 25kB
3. 79.162 2,109.835 ↑ 1,807.6 89 1

Hash Join (cost=131,604.86..143,075.99 rows=160,877 width=5) (actual time=1,924.988..2,109.835 rows=89 loops=1)

  • Hash Cond: (product_product.product_tmpl_id = product_product__product_tmpl_id.id)
4. 107.721 107.721 ↑ 1.0 321,279 1

Seq Scan on product_product (cost=0.00..8,655.75 rows=321,764 width=9) (actual time=0.032..107.721 rows=321,279 loops=1)

  • Filter: active
  • Rows Removed by Filter: 51896
5. 0.058 1,922.952 ↑ 2,006.2 93 1

Hash (cost=129,272.61..129,272.61 rows=186,580 width=8) (actual time=1,922.952..1,922.952 rows=93 loops=1)

  • Buckets: 262144 Batches: 1 Memory Usage: 2052kB
6. 0.042 1,922.894 ↑ 2,006.2 93 1

Nested Loop (cost=128,863.78..129,272.61 rows=186,580 width=8) (actual time=1,922.412..1,922.894 rows=93 loops=1)

7. 0.054 1,922.387 ↑ 2.2 93 1

HashAggregate (cost=128,863.36..128,865.36 rows=200 width=4) (actual time=1,922.369..1,922.387 rows=93 loops=1)

  • Group Key: temp_irt_current.id
8. 0.164 1,922.333 ↑ 6.4 93 1

Sort (cost=128,854.40..128,855.90 rows=597 width=36) (actual time=1,922.328..1,922.333 rows=93 loops=1)

  • Sort Key: temp_irt_current.name
  • Sort Method: quicksort Memory: 34kB
9.          

CTE temp_irt_current

10. 137.279 437.432 ↑ 1.0 373,173 1

Hash Left Join (cost=38.91..27,137.23 rows=373,173 width=36) (actual time=0.123..437.432 rows=373,173 loops=1)

  • Hash Cond: (ct.id = it.res_id)
11. 300.074 300.074 ↑ 1.0 373,173 1

Seq Scan on product_template ct (cost=0.00..26,118.73 rows=373,173 width=51) (actual time=0.023..300.074 rows=373,173 loops=1)

12. 0.001 0.079 ↓ 0.0 0 1

Hash (cost=38.20..38.20 rows=57 width=50) (actual time=0.079..0.079 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
13. 0.078 0.078 ↓ 0.0 0 1

Index Scan using ir_translation_unique on ir_translation it (cost=0.42..38.20 rows=57 width=50) (actual time=0.078..0.078 rows=0 loops=1)

  • Index Cond: (((type)::text = 'model'::text) AND ((name)::text = 'product.template,name'::text) AND ((lang)::text = 'en_US'::text))
  • Filter: (value <> ''::text)
14. 1,922.169 1,922.169 ↑ 6.4 93 1

CTE Scan on temp_irt_current (cost=0.00..101,689.64 rows=597 width=36) (actual time=15.547..1,922.169 rows=93 loops=1)

  • Filter: (unaccent(name) ~~* '%maran%'::text)
  • Rows Removed by Filter: 373080
15. 0.465 0.465 ↑ 1.0 1 93

Index Scan using product_template_pkey on product_template product_product__product_tmpl_id (cost=0.42..2.35 rows=1 width=4) (actual time=0.005..0.005 rows=1 loops=93)

  • Index Cond: (id = temp_irt_current.id)
  • Filter: sale_ok
Planning time : 6.046 ms
Execution time : 2,124.837 ms