explain.depesz.com

PostgreSQL's explain analyze made readable

Result: eu0g

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 2,999.543 ↑ 1.0 1 1

Limit (cost=2,316.52..2,316.52 rows=1 width=12) (actual time=2,999.539..2,999.543 rows=1 loops=1)

2. 2.286 2,999.538 ↑ 2.0 1 1

Sort (cost=2,316.52..2,316.52 rows=2 width=12) (actual time=2,999.538..2,999.538 rows=1 loops=1)

  • Sort Key: (count(*)) DESC
  • Sort Method: top-N heapsort Memory: 25kB
3. 27.384 2,997.252 ↓ 4,680.5 9,361 1

GroupAggregate (cost=0.98..2,316.51 rows=2 width=12) (actual time=0.578..2,997.252 rows=9,361 loops=1)

  • Group Key: cmn1.id
4. 91.323 2,969.868 ↓ 68,555.0 137,110 1

Nested Loop (cost=0.98..2,316.48 rows=2 width=4) (actual time=0.547..2,969.868 rows=137,110 loops=1)

5. 22.116 131.619 ↓ 101,738.0 101,738 1

Merge Left Join (cost=0.56..2,307.53 rows=1 width=4) (actual time=0.027..131.619 rows=101,738 loops=1)

  • Merge Cond: (cmn1.id = cmnd1.cinema_movie_name_id)
  • Filter: (cmnd1.id IS NULL)
  • Rows Removed by Filter: 7
6. 109.488 109.488 ↓ 1.0 101,745 1

Index Only Scan using movie_name_pkey on cinema_movie_name cmn1 (cost=0.42..2,050.90 rows=101,232 width=4) (actual time=0.020..109.488 rows=101,745 loops=1)

  • Heap Fetches: 86270
7. 0.015 0.015 ↓ 1.8 7 1

Index Scan using cinema_movie_name_data_entry_challenge_cinema_movie_name_id_use on cinema_movie_name_data_entry_challenge cmnd1 (cost=0.14..3.50 rows=4 width=8) (actual time=0.005..0.015 rows=7 loops=1)

  • Index Cond: (user_id = 1)
8. 2,746.926 2,746.926 ↑ 32.0 1 101,738

Index Scan using event_cinema_movie_name_id_idx on event e1 (cost=0.43..8.63 rows=32 width=4) (actual time=0.008..0.027 rows=1 loops=101,738)

  • Index Cond: (cinema_movie_name_id = cmn1.id)
  • Filter: ((unlisted_at IS NULL) AND (start_time > now()))
  • Rows Removed by Filter: 13
Planning time : 0.553 ms
Execution time : 2,999.632 ms