explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4mg9

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 7,973.138 ↑ 1.0 10 1

Limit (cost=3.01..4,555.20 rows=10 width=2,601) (actual time=7,923.011..7,973.138 rows=10 loops=1)

2. 0.030 7,973.133 ↑ 1,981.3 10 1

Nested Loop Left Join (cost=3.01..9,019,264.02 rows=19,813 width=2,601) (actual time=7,923.010..7,973.133 rows=10 loops=1)

3. 0.015 7,973.063 ↑ 1,981.3 10 1

Nested Loop Left Join (cost=2.58..8,935,617.96 rows=19,813 width=2,376) (actual time=7,922.995..7,973.063 rows=10 loops=1)

4. 0.012 7,961.868 ↑ 1,981.3 10 1

Nested Loop Left Join (cost=2.15..8,821,537.89 rows=19,813 width=2,315) (actual time=7,922.984..7,961.868 rows=10 loops=1)

5. 0.020 7,961.846 ↑ 1,981.3 10 1

Nested Loop Left Join (cost=1.71..8,700,662.11 rows=19,813 width=2,090) (actual time=7,922.981..7,961.846 rows=10 loops=1)

6. 0.023 7,961.816 ↑ 1,981.3 10 1

Nested Loop Left Join (cost=1.29..8,610,743.68 rows=19,813 width=2,021) (actual time=7,922.977..7,961.816 rows=10 loops=1)

7. 0.154 7,960.723 ↑ 1,981.3 10 1

Nested Loop (cost=0.86..8,498,351.81 rows=19,813 width=1,964) (actual time=7,922.972..7,960.723 rows=10 loops=1)

8. 7,960.509 7,960.509 ↑ 2,032.7 10 1

Index Scan using posts_createdat_public_index on "Posts" "Post" (cost=0.43..8,366,309.39 rows=20,327 width=261) (actual time=7,922.869..7,960.509 rows=10 loops=1)

  • Filter: ("userId" = ANY ('{201486,1825186,998608,340844,271909,308218,341986,216893,1917226, ... many more ...}'::integer[]))
  • Rows Removed by Filter: 218360
9. 0.060 0.060 ↑ 1.0 1 10

Index Scan using "Users_pkey" on "Users" "user" (cost=0.43..6.49 rows=1 width=1,703) (actual time=0.005..0.006 rows=1 loops=10)

  • Index Cond: (id = "Post"."userId")
10. 1.070 1.070 ↓ 0.0 0 10

Index Scan using "ActivityLogs_pkey" on "ActivityLogs" "activityLog" (cost=0.43..5.66 rows=1 width=57) (actual time=0.107..0.107 rows=0 loops=10)

  • Index Cond: ("Post"."activityLogId" = id)
11. 0.010 0.010 ↓ 0.0 0 10

Index Scan using "WeightLogs_pkey" on "WeightLogs" "weightLog" (cost=0.42..4.53 rows=1 width=69) (actual time=0.001..0.001 rows=0 loops=10)

  • Index Cond: ("Post"."weightLogId" = id)
12. 0.010 0.010 ↓ 0.0 0 10

Index Scan using "Workouts_pkey" on "Workouts" workout (cost=0.43..6.09 rows=1 width=225) (actual time=0.001..0.001 rows=0 loops=10)

  • Index Cond: ("Post"."workoutId" = id)
13. 11.180 11.180 ↓ 0.0 0 10

Index Scan using "WorkoutLogs_pkey" on "WorkoutLogs" "workoutLog" (cost=0.43..5.75 rows=1 width=61) (actual time=1.118..1.118 rows=0 loops=10)

  • Index Cond: ("Post"."workoutLogId" = id)
14. 0.040 0.040 ↓ 0.0 0 10

Index Scan using "Workouts_pkey" on "Workouts" "workoutLog.workout" (cost=0.43..4.21 rows=1 width=225) (actual time=0.004..0.004 rows=0 loops=10)

  • Index Cond: ("workoutLog"."workoutId" = id)