explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 628kD

Settings
# exclusive inclusive rows x rows loops node
1. 0.184 5,216.342 ↑ 1.0 1 1

Aggregate (cost=10,358.20..10,358.21 rows=1 width=8) (actual time=5,216.342..5,216.342 rows=1 loops=1)

2. 0.568 5,216.158 ↓ 64.6 323 1

Nested Loop (cost=38.03..10,358.19 rows=5 width=0) (actual time=50.549..5,216.158 rows=323 loops=1)

3. 0.395 0.678 ↓ 157.0 157 1

HashAggregate (cost=37.60..37.61 rows=1 width=4) (actual time=0.324..0.678 rows=157 loops=1)

  • Group Key: "Users".id
4. 0.034 0.283 ↓ 157.0 157 1

Nested Loop (cost=0.86..37.60 rows=1 width=4) (actual time=0.014..0.283 rows=157 loops=1)

5. 0.041 0.041 ↓ 52.0 52 1

Index Scan using users_auth_user_id_is_deleted on "Users" "Users_1" (cost=0.43..8.45 rows=1 width=4) (actual time=0.007..0.041 rows=52 loops=1)

  • Index Cond: ("authUserId" = 39,465)
6. 0.208 0.208 ↑ 2.7 3 52

Index Scan using users_employer_id_is_deleted on "Users" (cost=0.43..29.07 rows=8 width=12) (actual time=0.002..0.004 rows=3 loops=52)

  • Index Cond: ("employerId" = "Users_1".id)
7. 5,214.912 5,214.912 ↑ 2.5 2 157

Index Only Scan using payments_is_deleted_employee_id_payment_date on "Payments" (cost=0.43..10,320.52 rows=5 width=8) (actual time=21.004..33.216 rows=2 loops=157)

  • Index Cond: ("employeeId" = "Users".id)
  • Heap Fetches: 251
Planning time : 0.410 ms
Execution time : 5,216.405 ms