explain.depesz.com

PostgreSQL's explain analyze made readable

Result: R6Kt

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=650,847.48..654,990.58 rows=20 width=227) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=650,847.48..3,731,243.03 rows=14,870 width=227) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=650,846.91..3,604,195.82 rows=14,870 width=277) (actual rows= loops=)

  • Join Filter: (("accountTransfers"."writeoffPaymentId" = payments.id) OR ("accountTransfers"."refillPaymentId" = payments.id))
4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=650,846.91..3,414,213.45 rows=14,870 width=175) (actual rows= loops=)

  • Join Filter: (payments.id = ptob.id)
5. 0.000 0.000 ↓ 0.0

Gather Merge (cost=1,003.46..1,078,962.83 rows=14,870 width=143) (actual rows= loops=)

  • Workers Planned: 2
6. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=3.44..1,076,246.44 rows=6,196 width=143) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=3.01..1,024,799.84 rows=6,196 width=123) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=2.58..997,633.14 rows=6,196 width=119) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.15..946,179.35 rows=6,196 width=107) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.71..714,598.69 rows=27,882 width=96) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.14..479,221.66 rows=27,882 width=63) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Parallel Index Scan using "payments_accountId_date" on payments (cost=0.57..324,858.62 rows=34,067 width=59) (actual rows= loops=)

  • Index Cond: ("accountId" = 6,139,069)
13. 0.000 0.000 ↓ 0.0

Index Only Scan using "paymentToReservation_uniq_constraint" on "paymentToReservation" ptor (cost=0.57..4.52 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ("paymentId" = payments.id)
14. 0.000 0.000 ↓ 0.0

Index Scan using reservations_pkey on reservations (cost=0.57..8.44 rows=1 width=37) (actual rows= loops=)

  • Index Cond: (id = ptor."reservationId")
15. 0.000 0.000 ↓ 0.0

Index Scan using vehicles_pkey on vehicles (cost=0.43..8.31 rows=1 width=19) (actual rows= loops=)

  • Index Cond: (id = reservations."vehicleId")
  • Filter: (vrp ~~ '%A%'::text)
16. 0.000 0.000 ↓ 0.0

Index Scan using "paymentSources_pkey" on "paymentSources" (cost=0.43..8.30 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (payments."sourceId" = id)
17. 0.000 0.000 ↓ 0.0

Index Only Scan using "paymentToGatedParkingSession_uniq_constraint" on "paymentToGatedParkingSession" (cost=0.43..4.37 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ("paymentId" = payments.id)
18. 0.000 0.000 ↓ 0.0

Index Scan using "gatedParkingSessions_pkey" on "gatedParkingSessions" (cost=0.43..8.30 rows=1 width=24) (actual rows= loops=)

  • Index Cond: ("paymentToGatedParkingSession"."gatedParkingSessionId" = id)
19. 0.000 0.000 ↓ 0.0

Materialize (cost=649,843.44..650,126.76 rows=7,555 width=36) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Subquery Scan on ptob (cost=649,843.44..650,088.98 rows=7,555 width=36) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=649,843.44..650,013.43 rows=7,555 width=36) (actual rows= loops=)

  • Group Key: payments_1.id
22. 0.000 0.000 ↓ 0.0

Sort (cost=649,843.44..649,862.33 rows=7,555 width=78) (actual rows= loops=)

  • Sort Key: payments_1.id
23. 0.000 0.000 ↓ 0.0

Gather (cost=101,651.91..649,356.78 rows=7,555 width=78) (actual rows= loops=)

  • Workers Planned: 4
24. 0.000 0.000 ↓ 0.0

Hash Join (cost=100,651.91..647,601.28 rows=1,889 width=78) (actual rows= loops=)

  • Hash Cond: (grants."benefitId" = benefits.id)
25. 0.000 0.000 ↓ 0.0

Nested Loop (cost=100,645.48..647,589.70 rows=1,889 width=12) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Nested Loop (cost=100,645.05..633,731.83 rows=1,889 width=12) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Hash Join (cost=100,644.49..605,432.74 rows=3,718 width=12) (actual rows= loops=)

  • Hash Cond: (reservations_1."vehicleId" = vehicles_1.id)
28. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,895.36..506,639.71 rows=16,729 width=16) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,894.79..380,711.43 rows=16,729 width=8) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Parallel Bitmap Heap Scan on payments payments_1 (cost=1,894.22..291,313.47 rows=20,440 width=4) (actual rows= loops=)

  • Recheck Cond: ("accountId" = 6,139,069)
31. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on "payments_accountId_date" (cost=0.00..1,873.78 rows=81,761 width=0) (actual rows= loops=)

  • Index Cond: ("accountId" = 6,139,069)
32. 0.000 0.000 ↓ 0.0

Index Only Scan using "paymentToReservation_uniq_constraint" on "paymentToReservation" ptor_1 (cost=0.57..4.36 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ("paymentId" = payments_1.id)
33. 0.000 0.000 ↓ 0.0

Index Scan using reservations_pkey on reservations reservations_1 (cost=0.57..7.53 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = ptor_1."reservationId")
34. 0.000 0.000 ↓ 0.0

Hash (cost=86,084.74..86,084.74 rows=1,013,151 width=4) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Seq Scan on vehicles vehicles_1 (cost=0.00..86,084.74 rows=1,013,151 width=4) (actual rows= loops=)

  • Filter: (vrp ~~ '%A%'::text)
36. 0.000 0.000 ↓ 0.0

Index Scan using "reservationIntervals_reservationId" on "reservationIntervals" (cost=0.57..7.57 rows=4 width=12) (actual rows= loops=)

  • Index Cond: ("reservationId" = ptor_1."reservationId")
37. 0.000 0.000 ↓ 0.0

Index Scan using grants_pkey on grants (cost=0.43..7.34 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = "reservationIntervals"."grantId")
38. 0.000 0.000 ↓ 0.0

Hash (cost=5.08..5.08 rows=108 width=74) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Seq Scan on benefits (cost=0.00..5.08 rows=108 width=74) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..19.95 rows=730 width=110) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

Seq Scan on "accountTransfers" (cost=0.00..16.30 rows=730 width=110) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Index Scan using "transactionExtraFields_transactionId_idx" on "transactionExtraFields" (cost=0.57..8.52 rows=1 width=1,307) (actual rows= loops=)

  • Index Cond: ("transactionId" = payments."transactionId")