explain.depesz.com

PostgreSQL's explain analyze made readable

Result: okxW

Settings
# exclusive inclusive rows x rows loops node
1. 189.048 267.955 ↑ 1.0 13,967 1

Nested Loop Left Join (cost=424.40..17,168.48 rows=14,005 width=96) (actual time=9.864..267.955 rows=13,967 loops=1)

  • Join Filter: ((fb_videos.video_id = creatives.id) OR (links.creative_id = creatives.id))
  • Rows Removed by Join Filter: 977667
2. 11.248 23.039 ↓ 1.0 13,967 1

Hash Full Join (cost=424.40..803.23 rows=13,956 width=178) (actual time=9.800..23.039 rows=13,967 loops=1)

  • Hash Cond: (fb_posts.object_id = fb_videos.id)
3. 2.010 2.010 ↑ 1.0 13,956 1

Seq Scan on fb_posts (cost=0.00..321.56 rows=13,956 width=105) (actual time=0.012..2.010 rows=13,956 loops=1)

4. 0.011 9.781 ↑ 84.3 23 1

Hash (cost=400.18..400.18 rows=1,938 width=89) (actual time=9.781..9.781 rows=23 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 20kB
5. 7.486 9.770 ↑ 84.3 23 1

Hash Right Join (cost=4.28..400.18 rows=1,938 width=89) (actual time=0.632..9.770 rows=23 loops=1)

  • Hash Cond: ((fb_videos.id)::text = "substring"(links.url, '(?:.*/(?:videos)/)(.*)/$'::text))
6. 1.705 1.705 ↑ 1.0 9,230 1

Seq Scan on fb_videos (cost=0.00..307.30 rows=9,230 width=53) (actual time=0.006..1.705 rows=9,230 loops=1)

7. 0.524 0.579 ↑ 1.8 23 1

Hash (cost=3.75..3.75 rows=42 width=36) (actual time=0.579..0.579 rows=23 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
8. 0.055 0.055 ↑ 1.8 23 1

Seq Scan on campaign_social_links links (cost=0.00..3.75 rows=42 width=36) (actual time=0.023..0.055 rows=23 loops=1)

  • Filter: (platform = 'facebook'::social_platforms_single)
  • Rows Removed by Filter: 50
9. 55.848 55.868 ↓ 1.0 70 13,967

Materialize (cost=0.00..2.00 rows=67 width=4) (actual time=0.000..0.004 rows=70 loops=13,967)

10. 0.020 0.020 ↓ 1.0 70 1

Seq Scan on creatives (cost=0.00..1.67 rows=67 width=4) (actual time=0.007..0.020 rows=70 loops=1)