explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bu5l

Settings
# exclusive inclusive rows x rows loops node
1. 0.055 454.098 ↑ 1.0 100 1

Limit (cost=0.85..426.24 rows=100 width=329) (actual time=33.685..454.098 rows=100 loops=1)

2. 28.206 454.043 ↑ 832.8 100 1

Nested Loop Anti Join (cost=0.85..354,246.31 rows=83,276 width=329) (actual time=33.684..454.043 rows=100 loops=1)

  • Join Filter: (videos.id = video_ratings.video_id)
  • Rows Removed by Join Filter: 225000
3. 395.537 395.537 ↑ 832.8 100 1

Seq Scan on videos (cost=0.00..261,972.52 rows=83,277 width=329) (actual time=20.895..395.537 rows=100 loops=1)

  • Filter: ((file IS NOT NULL) AND (num_ratings < 5) AND (worker_id <> 199151) AND (dataset_id = 1) AND ((review_status)::text = 'approved'::text))
  • Rows Removed by Filter: 485137
4. 18.968 30.300 ↓ 30.8 2,250 100

Materialize (cost=0.85..1,085.66 rows=73 width=4) (actual time=0.011..0.303 rows=2,250 loops=100)

5. 0.602 11.332 ↓ 30.8 2,250 1

Nested Loop (cost=0.85..1,085.29 rows=73 width=4) (actual time=1.087..11.332 rows=2,250 loops=1)

6. 1.471 1.471 ↓ 7.8 47 1

Index Scan using index_assignments_on_worker_id on assignments (cost=0.42..70.60 rows=6 width=4) (actual time=1.013..1.471 rows=47 loops=1)

  • Index Cond: (worker_id = 199151)
  • Filter: ((type)::text = 'RatingAssignment'::text)
7. 9.259 9.259 ↑ 1.4 48 47

Index Scan using index_video_ratings_on_assignment_id on video_ratings (cost=0.43..168.46 rows=66 width=12) (actual time=0.061..0.197 rows=48 loops=47)

  • Index Cond: (assignment_id = assignments.id)