explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Pywd

Settings
# exclusive inclusive rows x rows loops node
1. 4,011.009 14,172.405 ↓ 24.2 1,753,270 1

Hash Join (cost=75,802.07..223,240.47 rows=72,423 width=9) (actual time=4,611.623..14,172.405 rows=1,753,270 loops=1)

  • Hash Cond: (prc2.recommended_content_id = pc2.product_content_id)
2. 2,935.668 5,597.694 ↓ 24.2 1,753,279 1

Nested Loop (cost=1.57..146,353.63 rows=72,423 width=16) (actual time=25.231..5,597.694 rows=1,753,279 loops=1)

  • Join Filter: (prm.content_id = prc2.content_id)
3. 13.936 145.900 ↓ 16.6 2,039 1

Nested Loop (cost=1.00..4,361.91 rows=123 width=16) (actual time=25.134..145.900 rows=2,039 loops=1)

4. 98.494 98.494 ↓ 9.4 3,347 1

Index Scan using product_content_recommendation_main2_recommended_content_id_idx on product_content_recommendation_main2 prm (cost=0.57..2,090.04 rows=356 width=8) (actual time=24.720..98.494 rows=3,347 loops=1)

  • Index Cond: (recommended_content_id = 3371132)
  • Filter: (version = 1)
  • Rows Removed by Filter: 2708
5. 33.470 33.470 ↑ 1.0 1 3,347

Index Scan using pk_product_content on product_content prc (cost=0.43..6.37 rows=1 width=8) (actual time=0.009..0.010 rows=1 loops=3,347)

  • Index Cond: (product_content_id = prm.content_id)
  • Filter: is_visible
  • Rows Removed by Filter: 0
6. 2,516.126 2,516.126 ↓ 1.8 860 2,039

Index Only Scan using product_content_recommendatio_content_id_recommended_content_ve on product_content_recommendation_main2 prc2 (cost=0.57..1,148.44 rows=477 width=16) (actual time=0.024..1.234 rows=860 loops=2,039)

  • Index Cond: ((content_id = prc.product_content_id) AND (version = 1))
  • Heap Fetches: 1753279
7. 2,374.272 4,563.702 ↑ 1.0 2,365,622 1

Hash (cost=46,230.22..46,230.22 rows=2,365,622 width=9) (actual time=4,563.702..4,563.702 rows=2,365,622 loops=1)

  • Buckets: 4194304 Batches: 1 Memory Usage: 143657kB
8. 2,189.430 2,189.430 ↑ 1.0 2,365,622 1

Seq Scan on product_content pc2 (cost=0.00..46,230.22 rows=2,365,622 width=9) (actual time=0.026..2,189.430 rows=2,365,622 loops=1)