explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VuwL

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Aggregate (cost=589,306.70..589,306.71 rows=1 width=32) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Subquery Scan on res (cost=589,305.46..589,306.64 rows=25 width=140) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Limit (cost=589,305.46..589,306.39 rows=25 width=116) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=589,305.46..641,110.65 rows=1,395,100 width=116) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=589,305.46..613,069.14 rows=13,951 width=116) (actual rows= loops=)

  • Group Key: p.id
6. 0.000 0.000 ↓ 0.0

Merge Join (cost=589,305.46..607,014.87 rows=1,175,977 width=320) (actual rows= loops=)

  • Merge Cond: (product_variant_rows.product_id = p.id)
7. 0.000 0.000 ↓ 0.0

Sort (cost=587,991.56..590,931.50 rows=1,175,977 width=252) (actual rows= loops=)

  • Sort Key: product_variant_rows.product_id
8. 0.000 0.000 ↓ 0.0

Subquery Scan on product_variant_rows (cost=0.98..188,056.16 rows=1,175,977 width=252) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.98..176,296.39 rows=1,175,977 width=244) (actual rows= loops=)

  • Group Key: pv.id, c.id, s.id
10. 0.000 0.000 ↓ 0.0

Merge Join (cost=0.98..149,836.90 rows=1,175,977 width=255) (actual rows= loops=)

  • Merge Cond: (pv.id = apm.product_variant_id)
11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.56..44,932.49 rows=106,907 width=212) (actual rows= loops=)

  • Join Filter: (pv.size_id = s.id)
12. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.56..28,960.97 rows=106,907 width=140) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Index Scan using idx_id_color_id_size_id on product_variant pv (cost=0.42..12,120.01 rows=106,907 width=86) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Index Scan using ""colorPK"" on color c (cost=0.14..0.16 rows=1 width=70) (actual rows= loops=)

  • Index Cond: (id = pv.color_id)
15. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..1.15 rows=10 width=88) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Seq Scan on size s (cost=0.00..1.10 rows=10 width=88) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Index Scan using idx_product_variant on attributes_per_market apm (cost=0.43..89,942.28 rows=1,175,977 width=43) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Sort (cost=1,313.90..1,348.78 rows=13,951 width=84) (actual rows= loops=)

  • Sort Key: p.id
19. 0.000 0.000 ↓ 0.0

Seq Scan on product p (cost=0.00..353.51 rows=13,951 width=84) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Function Scan on json_array_elements product_variants_elements (cost=0.00..1.00 rows=100 width=0) (actual rows= loops=)