explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1cEd

Settings
# exclusive inclusive rows x rows loops node
1. 11.240 223.918 ↑ 1.0 22,094 1

Hash Join (cost=13,156.49..13,931.04 rows=22,339 width=59) (actual time=184.920..223.918 rows=22,094 loops=1)

  • Hash Cond: (category_options.id = product_options.option_id)
2. 27.804 27.804 ↑ 1.0 22,290 1

Seq Scan on category_options (cost=0.00..467.39 rows=22,339 width=59) (actual time=0.015..27.804 rows=22,290 loops=1)

3. 7.484 184.874 ↑ 1.0 22,120 1

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

  • Buckets: 32768 Batches: 1 Memory Usage: 1034kB
4. 55.976 177.390 ↑ 1.0 22,120 1

HashAggregate (cost=12,643.53..12,871.51 rows=22,798 width=4) (actual time=172.577..177.390 rows=22,120 loops=1)

  • Group Key: product_options.option_id
5. 44.448 121.414 ↑ 1.1 105,401 1

Hash Semi Join (cost=2,953.75..12,354.00 rows=115,814 width=4) (actual time=39.812..121.414 rows=105,401 loops=1)

  • Hash Cond: (product_options.product_id = products.id)
6. 37.187 37.187 ↓ 1.0 213,394 1

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

7. 4.812 39.779 ↓ 1.0 9,855 1

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

  • Buckets: 16384 Batches: 1 Memory Usage: 513kB
8. 5.531 34.967 ↓ 1.0 9,855 1

Merge Semi Join (cost=0.79..2,833.06 rows=9,655 width=8) (actual time=0.055..34.967 rows=9,855 loops=1)

  • Merge Cond: (products.id = collection_products.product_id)
9. 14.505 14.505 ↑ 1.0 19,998 1

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

  • Heap Fetches: 19998
10. 3.747 14.931 ↓ 1.0 9,855 1

Nested Loop (cost=0.42..796.74 rows=9,655 width=4) (actual time=0.034..14.931 rows=9,855 loops=1)

11. 11.184 11.184 ↓ 1.0 9,855 1

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 time=0.020..11.184 rows=9,855 loops=1)

  • Index Cond: (collection_id = 125)
  • Heap Fetches: 9855
12. 0.000 0.000 ↑ 1.0 1 9,855

Materialize (cost=0.00..1.17 rows=1 width=4) (actual time=0.000..0.000 rows=1 loops=9,855)

13. 0.011 0.011 ↑ 1.0 1 1

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

  • Filter: (id = 125)
  • Rows Removed by Filter: 32
Planning time : 0.625 ms
Execution time : 224.952 ms