explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ps5D

Settings
# exclusive inclusive rows x rows loops node
1. 0.229 14.054 ↓ 28.0 56 1

Sort (cost=223.06..223.06 rows=2 width=1,578) (actual time=14.051..14.054 rows=56 loops=1)

  • Sort Key: (1), livestreamings.start_time
  • Sort Method: quicksort Memory: 137kB
2. 0.119 13.825 ↓ 28.0 56 1

Nested Loop Left Join (cost=65.63..223.05 rows=2 width=1,578) (actual time=0.543..13.825 rows=56 loops=1)

3. 0.007 0.770 ↓ 28.0 56 1

Append (cost=65.21..130.45 rows=2 width=1,546) (actual time=0.468..0.770 rows=56 loops=1)

4. 0.120 0.473 ↓ 34.0 34 1

Sort (cost=65.21..65.21 rows=1 width=1,546) (actual time=0.468..0.473 rows=34 loops=1)

  • Sort Key: livestreamings.start_time
  • Sort Method: quicksort Memory: 93kB
5. 0.074 0.353 ↓ 34.0 34 1

Hash Left Join (cost=14.78..65.20 rows=1 width=1,546) (actual time=0.131..0.353 rows=34 loops=1)

  • Hash Cond: (livestreamings.id = premium_contents.premiumable_id)
  • Filter: (premium_contents.id IS NULL)
  • Rows Removed by Filter: 22
6. 0.184 0.184 ↑ 1.6 56 1

Index Scan using index_livestreamings_tv_stream on livestreamings (cost=0.14..50.11 rows=89 width=1,542) (actual time=0.021..0.184 rows=56 loops=1)

7. 0.016 0.095 ↑ 1.1 58 1

Hash (cost=13.88..13.88 rows=61 width=12) (actual time=0.095..0.095 rows=58 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
8. 0.079 0.079 ↑ 1.1 58 1

Seq Scan on premium_contents (cost=0.00..13.88 rows=61 width=12) (actual time=0.008..0.079 rows=58 loops=1)

  • Filter: ((premiumable_type)::text = 'Livestreaming'::text)
  • Rows Removed by Filter: 482
9. 0.086 0.290 ↓ 22.0 22 1

Sort (cost=65.21..65.21 rows=1 width=1,546) (actual time=0.288..0.290 rows=22 loops=1)

  • Sort Key: livestreamings_1.start_time
  • Sort Method: quicksort Memory: 69kB
10. 0.053 0.204 ↓ 22.0 22 1

Hash Join (cost=14.78..65.20 rows=1 width=1,546) (actual time=0.143..0.204 rows=22 loops=1)

  • Hash Cond: (livestreamings_1.id = premium_contents_1.premiumable_id)
11. 0.058 0.058 ↑ 1.6 56 1

Index Scan using index_livestreamings_tv_stream on livestreamings livestreamings_1 (cost=0.14..50.11 rows=89 width=1,542) (actual time=0.012..0.058 rows=56 loops=1)

12. 0.013 0.093 ↑ 1.1 58 1

Hash (cost=13.88..13.88 rows=61 width=4) (actual time=0.093..0.093 rows=58 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
13. 0.080 0.080 ↑ 1.1 58 1

Seq Scan on premium_contents premium_contents_1 (cost=0.00..13.88 rows=61 width=4) (actual time=0.009..0.080 rows=58 loops=1)

  • Filter: ((id IS NOT NULL) AND ((premiumable_type)::text = 'Livestreaming'::text))
  • Rows Removed by Filter: 482
14. 12.936 12.936 ↓ 0.0 0 56

Index Scan using livestreaming_schedule_filter_time on livestreaming_schedules (cost=0.42..46.29 rows=1 width=36) (actual time=0.231..0.231 rows=0 loops=56)

  • Index Cond: ((livestreamings.id = livestreaming_id) AND (start_time <= '2020-02-03 05:56:54'::timestamp without time zone) AND ('2020-02-03 05:56:54'::timestamp without time zone <= end_time))
Planning time : 3.232 ms
Execution time : 14.322 ms