explain.depesz.com

PostgreSQL's explain analyze made readable

Result: D3if

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

Hash Join (cost=13,156.49..13,931.04 rows=22,339 width=59) (actual rows= loops=)

  • Hash Cond: (category_options.id = product_options.option_id)
2. 0.000 0.000 ↓ 0.0

Seq Scan on category_options (cost=0.00..467.39 rows=22,339 width=59) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Hash (cost=12,871.51..12,871.51 rows=22,798 width=4) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

HashAggregate (cost=12,643.53..12,871.51 rows=22,798 width=4) (actual rows= loops=)

  • Group Key: product_options.option_id
5. 0.000 0.000 ↓ 0.0

Hash Semi Join (cost=2,953.75..12,354.00 rows=115,814 width=4) (actual rows= loops=)

  • Hash Cond: (product_options.product_id = products.id)
6. 0.000 0.000 ↓ 0.0

Seq Scan on product_options (cost=0.00..7,551.72 rows=213,372 width=8) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Hash (cost=2,833.06..2,833.06 rows=9,655 width=8) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Merge Semi Join (cost=0.79..2,833.06 rows=9,655 width=8) (actual rows= loops=)

  • Merge Cond: (products.id = collection_products.product_id)
9. 0.000 0.000 ↓ 0.0

Index Only Scan using products_pkey on products (cost=0.29..1,929.24 rows=20,017 width=4) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.42..796.74 rows=9,655 width=4) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Index Only Scan using collection_products_collection_id_product_id_unique on collection_products (cost=0.42..674.89 rows=9,655 width=8) (actual rows= loops=)

  • Index Cond: (collection_id = 125)
12. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..1.17 rows=1 width=4) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Seq Scan on collections (cost=0.00..1.16 rows=1 width=4) (actual rows= loops=)

  • Filter: (id = 125)