explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KU2j

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 91.529 ↓ 2.0 2 1

Unique (cost=43,576.84..43,576.85 rows=1 width=9) (actual time=91.527..91.529 rows=2 loops=1)

2. 0.019 91.526 ↓ 2.0 2 1

Sort (cost=43,576.84..43,576.85 rows=1 width=9) (actual time=91.526..91.526 rows=2 loops=1)

  • Sort Key: (((NOT ((productfrom.width)::text IS DISTINCT FROM (productto.width)::text)) AND (NOT ((productfrom.depth)::text IS DISTINCT FROM (productto.depth)::text)) AND (NOT ((productfrom.length)::text IS DISTINCT FROM (productto.length)::text)) AND (NOT ((productfrom.height)::text IS DISTINCT FROM (productto.height)::text)) AND (NOT ((productfrom.diameter)::text IS DISTINCT FROM (productto.diameter)::text)))) DESC, (((productto.custom_program IS NULL) = (productfrom.custom_program IS NULL))) DESC, productto.article_number
  • Sort Method: quicksort Memory: 25kB
3. 0.006 91.507 ↓ 2.0 2 1

Nested Loop Semi Join (cost=4.67..43,576.83 rows=1 width=9) (actual time=15.111..91.507 rows=2 loops=1)

4. 0.047 91.305 ↑ 6.5 2 1

Nested Loop Left Join (cost=2.40..42,375.86 rows=13 width=71) (actual time=14.977..91.305 rows=2 loops=1)

  • Filter: ((fromisleather.name)::text IS DISTINCT FROM (toisleather.name)::text)
  • Rows Removed by Filter: 44
5. 0.754 91.120 ↓ 3.3 46 1

Nested Loop Left Join (cost=1.97..42,329.20 rows=14 width=83) (actual time=14.958..91.120 rows=46 loops=1)

  • Filter: (NOT ((subsetto.characteristic_value_key)::text IS DISTINCT FROM (subsetfrom.characteristic_value_key)::text))
  • Rows Removed by Filter: 872
6. 16.757 86.694 ↓ 1.1 918 1

Nested Loop (cost=1.41..36,238.09 rows=845 width=87) (actual time=13.982..86.694 rows=918 loops=1)

  • Join Filter: ((productto.product_id <> productfrom.product_id) AND (NOT ((productto.collection)::text IS DISTINCT FROM (productfrom.collection)::text)))
  • Rows Removed by Join Filter: 74,960
7. 0.002 0.053 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.41..25.50 rows=1 width=60) (actual time=0.050..0.053 rows=1 loops=1)

8. 0.003 0.040 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.98..17.03 rows=1 width=48) (actual time=0.037..0.040 rows=1 loops=1)

9. 0.023 0.023 ↑ 1.0 1 1

Index Scan using web_product_article_num_uk on web_product productfrom (cost=0.42..8.44 rows=1 width=44) (actual time=0.021..0.023 rows=1 loops=1)

  • Index Cond: (((article_number)::text = '10009994'::text) AND (release_id = 390))
10. 0.014 0.014 ↑ 1.0 1 1

Index Scan using web_product_attribute_pk on web_product_attribute subsetfrom (cost=0.56..8.58 rows=1 width=20) (actual time=0.014..0.014 rows=1 loops=1)

  • Index Cond: ((productfrom.product_id = product_id) AND (productfrom.release_id = release_id) AND (release_id = 390) AND ((characteristic_key)::text = 'EPM_SUBSET'::text))
11. 0.011 0.011 ↓ 0.0 0 1

Index Only Scan using web_product_type_pk on web_product_type fromisleather (cost=0.43..8.45 rows=1 width=28) (actual time=0.011..0.011 rows=0 loops=1)

  • Index Cond: ((product_id = productfrom.product_id) AND (release_id = productfrom.release_id) AND (release_id = 390) AND (name = 'LEATHER'::text))
  • Heap Fetches: 0
12. 69.884 69.884 ↑ 1.0 75,878 1

Seq Scan on web_product productto (cost=0.00..35,073.70 rows=75,926 width=51) (actual time=0.015..69.884 rows=75,878 loops=1)

  • Filter: (release_id = 390)
  • Rows Removed by Filter: 380,498
13. 3.672 3.672 ↑ 1.0 1 918

Index Scan using web_product_attribute_pk on web_product_attribute subsetto (cost=0.56..7.20 rows=1 width=20) (actual time=0.004..0.004 rows=1 loops=918)

  • Index Cond: ((productto.product_id = product_id) AND (productto.release_id = release_id) AND (release_id = 390) AND ((characteristic_key)::text = 'EPM_SUBSET'::text))
14. 0.138 0.138 ↓ 0.0 0 46

Index Only Scan using web_product_type_pk on web_product_type toisleather (cost=0.43..3.32 rows=1 width=28) (actual time=0.003..0.003 rows=0 loops=46)

  • Index Cond: ((product_id = productto.product_id) AND (release_id = productto.release_id) AND (release_id = 390) AND (name = 'LEATHER'::text))
  • Heap Fetches: 2
15. 0.004 0.196 ↑ 1.0 1 2

Nested Loop (cost=2.27..92.37 rows=1 width=16) (actual time=0.098..0.098 rows=1 loops=2)

  • Join Filter: ((rls.valid_from >= pg.valid_from) AND (rls.valid_from <= pg.valid_to))
16. 0.004 0.178 ↑ 1.0 1 2

Nested Loop (cost=1.98..89.68 rows=1 width=48) (actual time=0.089..0.089 rows=1 loops=2)

  • Join Filter: ((rls.valid_from >= c.valid_from) AND (rls.valid_from <= c.valid_to))
17. 0.008 0.162 ↑ 1.0 1 2

Nested Loop (cost=1.71..87.52 rows=1 width=64) (actual time=0.081..0.081 rows=1 loops=2)

18. 0.004 0.134 ↑ 1.0 1 2

Nested Loop (cost=1.42..78.25 rows=1 width=72) (actual time=0.067..0.067 rows=1 loops=2)

  • Join Filter: ((rls.valid_from >= s.valid_from) AND (rls.valid_from <= s.valid_to))
19. 0.010 0.010 ↑ 1.0 1 2

Seq Scan on release rls (cost=0.00..1.07 rows=1 width=16) (actual time=0.005..0.005 rows=1 loops=2)

  • Filter: (id = 390)
  • Rows Removed by Filter: 3
20. 0.004 0.120 ↑ 4.0 1 2

Nested Loop (cost=1.42..77.12 rows=4 width=80) (actual time=0.060..0.060 rows=1 loops=2)

21. 0.002 0.086 ↑ 4.0 1 2

Nested Loop (cost=1.13..65.10 rows=4 width=56) (actual time=0.043..0.043 rows=1 loops=2)

22. 0.002 0.070 ↑ 4.0 1 2

Nested Loop (cost=0.84..55.13 rows=4 width=48) (actual time=0.035..0.035 rows=1 loops=2)

23. 0.022 0.022 ↑ 1.0 1 2

Index Scan using product_group_product_product_id_idx on product_group_product pgp (cost=0.42..14.91 rows=1 width=24) (actual time=0.010..0.011 rows=1 loops=2)

  • Index Cond: (product_id = productto.product_id)
  • Filter: ((release_id = 390) AND (deleted_flag = 0))
  • Rows Removed by Filter: 0
24. 0.046 0.046 ↑ 4.0 1 2

Index Scan using subcategory_set_product_group_product_group_id_idx on subcategory_set_product_group sspg (cost=0.42..40.18 rows=4 width=24) (actual time=0.023..0.023 rows=1 loops=2)

  • Index Cond: (product_group_id = pgp.product_group_id)
  • Filter: ((release_id = 390) AND (deleted_flag = 0))
  • Rows Removed by Filter: 18
25. 0.014 0.014 ↑ 1.0 1 2

Index Scan using subcategory_set_pk on subcategory_set ss (cost=0.29..2.49 rows=1 width=24) (actual time=0.007..0.007 rows=1 loops=2)

  • Index Cond: ((id = sspg.subcategory_set_id) AND (release_id = 390))
  • Filter: (deleted_flag = 0)
26. 0.030 0.030 ↑ 1.0 1 2

Index Scan using subcategory_pk on subcategory s (cost=0.29..3.00 rows=1 width=32) (actual time=0.015..0.015 rows=1 loops=2)

  • Index Cond: ((id = ss.subcategory_id) AND (release_id = 390))
  • Filter: (deleted_flag = 0)
27. 0.020 0.020 ↑ 1.0 1 2

Index Scan using category_subcategory_subcategory_id_idx on category_subcategory cs (cost=0.29..9.26 rows=1 width=24) (actual time=0.010..0.010 rows=1 loops=2)

  • Index Cond: (subcategory_id = s.id)
  • Filter: ((release_id = 390) AND (deleted_flag = 0))
  • Rows Removed by Filter: 3
28. 0.012 0.012 ↑ 1.0 1 2

Index Scan using category_pk on category c (cost=0.28..2.15 rows=1 width=32) (actual time=0.006..0.006 rows=1 loops=2)

  • Index Cond: ((id = cs.category_id) AND (release_id = 390))
  • Filter: (deleted_flag = 0)
29. 0.014 0.014 ↑ 1.0 1 2

Index Scan using product_group_pk on product_group pg (cost=0.29..2.67 rows=1 width=32) (actual time=0.006..0.007 rows=1 loops=2)

  • Index Cond: ((id = pgp.product_group_id) AND (release_id = 390))
  • Filter: (deleted_flag = 0)
Planning time : 93.963 ms
Execution time : 91.806 ms