explain.depesz.com

A tool for finding a real cause for slow queries.

Result: 0JOu

options
exclusive inclusive rows x rows loops node
301.664 1013.932 ↑ 1.1 8560 1

Hash Left Join (cost=24649.54..353363.67 rows=9567 width=359) (actual time=354.007..1013.932 rows=8560 loops=1)

  • Hash Cond: (products.product_group_id = product_groups.id)
21.955 677.178 ↑ 1.1 8560 1

Hash Left Join (cost=23400.13..349454.02 rows=9567 width=355) (actual time=318.573..677.178 rows=8560 loops=1)

  • Hash Cond: (products.rubric_id = rubrics.id)
26.258 481.700 ↑ 1.1 8560 1

Hash Left Join (cost=3840.25..329703.75 rows=9567 width=358) (actual time=144.921..481.700 rows=8560 loops=1)

  • Hash Cond: (products.rubric_id = rubrics_denormalization_tree.rubric_id)
21.830 310.716 ↑ 1.1 8560 1

Nested Loop Left Join (cost=0.00..325673.11 rows=9567 width=326) (actual time=0.090..310.716 rows=8560 loops=1)

27.622 229.400 ↑ 1.1 8498 1

Nested Loop (cost=0.00..193032.71 rows=9567 width=322) (actual time=0.069..229.400 rows=8498 loops=1)

31.294 142.292 ↑ 1.1 8498 1

Nested Loop (cost=0.00..126042.61 rows=9567 width=301) (actual time=0.054..142.292 rows=8498 loops=1)

43.014 43.014 ↑ 1.2 8498 1

Index Scan using products_436_pkey on products (cost=0.00..36884.27 rows=9866 width=88) (actual time=0.034..43.014 rows=8498 loops=1)

  • Index Cond: ((id >= 7740001) AND (id <= 7750000))
  • Filter: (CASE WHEN (state = 'pending'::product_state) THEN 1 WHEN (state = 'accepted'::product_state) THEN 2 WHEN (state = 'changed'::product_state) THEN 3 WHEN (state = 'declined'::product_state) THEN 4 WHEN (state = 'deleted'::product_state) THEN 5 ELSE NULL::integer END <> 5)
67.984 67.984 ↑ 1.0 1 8498

Index Scan using index_search_index_products_on_product_id on search_index_products (cost=0.00..9.02 rows=1 width=217) (actual time=0.007..0.008 rows=1 loops=8498)

  • Index Cond: (search_index_products.product_id = products.id)
59.486 59.486 ↑ 1.0 1 8498

Index Scan using companies_pkey on companies (cost=0.00..6.99 rows=1 width=25) (actual time=0.006..0.007 rows=1 loops=8498)

  • Index Cond: (companies.id = products.company_id)
59.486 59.486 ↑ 5.0 1 8498

Index Scan using i_product_images_product_id on product_images (cost=0.00..13.80 rows=5 width=8) (actual time=0.006..0.007 rows=1 loops=8498)

  • Index Cond: (product_images.product_id = products.id)
  • Filter: (product_images."position" = 1)
80.859 144.726 ↑ 1.0 103211 1

Hash (cost=2550.11..2550.11 rows=103211 width=32) (actual time=144.726..144.726 rows=103211 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 6451kB
63.867 63.867 ↑ 1.0 103211 1

Seq Scan on rubrics_denormalization_tree (cost=0.00..2550.11 rows=103211 width=32) (actual time=0.004..63.867 rows=103211 loops=1)

68.018 173.523 ↑ 1.0 103906 1

Hash (cost=18261.06..18261.06 rows=103906 width=5) (actual time=173.523..173.523 rows=103906 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 4059kB
105.505 105.505 ↑ 1.0 103906 1

Seq Scan on rubrics (cost=0.00..18261.06 rows=103906 width=5) (actual time=0.009..105.505 rows=103906 loops=1)

16.388 35.090 ↓ 1.0 26427 1

Hash (cost=919.18..919.18 rows=26418 width=8) (actual time=35.090..35.090 rows=26427 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 1033kB
18.702 18.702 ↓ 1.0 26427 1

Seq Scan on product_groups (cost=0.00..919.18 rows=26418 width=8) (actual time=0.009..18.702 rows=26427 loops=1)