explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Osqk

Settings
# exclusive inclusive rows x rows loops node
1. 6.269 71.305 ↓ 11.0 5,465 1

Hash Join (cost=4,305.94..12,051.89 rows=496 width=263) (actual time=25.690..71.305 rows=5,465 loops=1)

  • Hash Cond: (ci.location_id = loc.location_id)
2. 1.467 43.152 ↓ 11.0 5,465 1

Nested Loop (cost=4,304.28..5,769.76 rows=496 width=150) (actual time=25.602..43.152 rows=5,465 loops=1)

3. 2.226 30.755 ↓ 11.0 5,465 1

Hash Join (cost=4,303.86..5,066.65 rows=496 width=145) (actual time=25.570..30.755 rows=5,465 loops=1)

  • Hash Cond: (vd.check_in_id = ci.check_in_id)
4. 3.305 3.305 ↑ 1.0 6,310 1

Seq Scan on video_details vd (cost=0.00..746.22 rows=6,310 width=121) (actual time=0.307..3.305 rows=6,310 loops=1)

  • Filter: media_release
  • Rows Removed by Filter: 3412
5. 3.528 25.224 ↓ 1.1 16,767 1

Hash (cost=4,109.59..4,109.59 rows=15,542 width=40) (actual time=25.223..25.224 rows=16,767 loops=1)

  • Buckets: 32768 (originally 16384) Batches: 1 (originally 1) Memory Usage: 1501kB
6. 21.644 21.696 ↓ 1.1 16,767 1

Bitmap Heap Scan on check_in ci (cost=16.08..4,109.59 rows=15,542 width=40) (actual time=0.136..21.696 rows=16,767 loops=1)

  • Recheck Cond: ((session_start_time >= '2019-06-01 00:00:00+00'::timestamp with time zone) AND (session_start_time <= '2019-07-01 00:00:00+00'::timestamp with time zone))
  • Rows Removed by Index Recheck: 114150
  • Heap Blocks: lossy=2258
7. 0.052 0.052 ↑ 2.0 23,040 1

Bitmap Index Scan on check_in_session_start_time_idx1 (cost=0.00..12.20 rows=45,567 width=0) (actual time=0.052..0.052 rows=23,040 loops=1)

  • Index Cond: ((session_start_time >= '2019-06-01 00:00:00+00'::timestamp with time zone) AND (session_start_time <= '2019-07-01 00:00:00+00'::timestamp with time zone))
8. 10.930 10.930 ↑ 1.0 1 5,465

Index Scan using customer_pkey on customer cst (cost=0.42..1.42 rows=1 width=21) (actual time=0.002..0.002 rows=1 loops=5,465)

  • Index Cond: (customer_id = ci.customer_id)
9. 0.008 0.024 ↑ 1.0 29 1

Hash (cost=1.29..1.29 rows=29 width=17) (actual time=0.024..0.024 rows=29 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
10. 0.016 0.016 ↑ 1.0 29 1

Seq Scan on location loc (cost=0.00..1.29 rows=29 width=17) (actual time=0.006..0.016 rows=29 loops=1)

11.          

SubPlan (forHash Join)

12. 4.933 21.860 ↑ 1.0 1 5,465

Nested Loop (cost=0.56..12.64 rows=1 width=17) (actual time=0.004..0.004 rows=1 loops=5,465)

13. 5.465 5.465 ↑ 1.0 1 5,465

Index Only Scan using video_details_id_game_id_unique on video_to_game_id vg (cost=0.29..4.33 rows=1 width=5) (actual time=0.001..0.001 rows=1 loops=5,465)

  • Index Cond: (video_details_id = vd.video_details_id)
  • Filter: (game_id <> 'n1'::text)
  • Rows Removed by Filter: 1
  • Heap Fetches: 0
14. 11.462 11.462 ↑ 1.0 1 5,731

Index Scan using game_game_id_idx on game g (cost=0.28..8.29 rows=1 width=25) (actual time=0.002..0.002 rows=1 loops=5,731)

  • Index Cond: (game_id = vg.game_id)
Planning time : 1.623 ms