explain.depesz.com

PostgreSQL's explain analyze made readable

Result: G4X : Query plan for reply select query

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.011 716.750 ↑ 1.0 25 1

Limit (cost=1.29..20,939.39 rows=25 width=248) (actual time=522.852..716.750 rows=25 loops=1)

2. 0.027 716.739 ↑ 80.2 25 1

Nested Loop Left Join (cost=1.29..1,679,237.24 rows=2,005 width=248) (actual time=522.851..716.739 rows=25 loops=1)

3. 0.048 716.562 ↑ 80.0 25 1

Nested Loop (cost=0.86..1,678,187.53 rows=2,001 width=165) (actual time=522.830..716.562 rows=25 loops=1)

4. 716.414 716.414 ↑ 80.0 25 1

Index Scan Backward using links_reply_submitted_on on links_reply (cost=0.44..1,664,030.07 rows=2,001 width=50) (actual time=522.811..716.414 rows=25 loops=1)

  • Filter: (which_group_id = 119,287)
  • Rows Removed by Filter: 1,721,320
5. 0.100 0.100 ↑ 1.0 1 25

Index Scan using auth_user_pkey on auth_user (cost=0.42..7.07 rows=1 width=115) (actual time=0.004..0.004 rows=1 loops=25)

  • Index Cond: (id = links_reply.writer_id)
6. 0.150 0.150 ↑ 1.0 1 25

Index Scan using links_userprofile_user_id_key on links_userprofile (cost=0.42..0.51 rows=1 width=83) (actual time=0.006..0.006 rows=1 loops=25)

  • Index Cond: (auth_user.id = user_id)
Planning time : 0.407 ms
Execution time : 716.826 ms