explain.depesz.com

PostgreSQL's explain analyze made readable

Result: p0l7

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 13.016 ↑ 33.0 1 1

Nested Loop Left Join (cost=2,226.18..3,600.93 rows=33 width=545) (actual time=13.011..13.016 rows=1 loops=1)

2. 13.009 13.009 ↑ 33.0 1 1

Nested Loop Left Join (cost=2,225.90..3,333.38 rows=33 width=425) (actual time=13.005..13.009 rows=1 loops=1)

3. 0.000 0.001 ↓ 0.0 0 1

Index Scan using "AlternatePaymentType_pkey" on "AlternatePaymentType" othertype (cost=0.29..8.06 rows=1 width=24) (actual time=0.000..0.001 rows=0 loops=1)

  • Index Cond: (op.othertype_id = id)
4. 13.006 13.006 ↑ 33.0 1 1

Nested Loop Left Join (cost=2,225.46..3,054.11 rows=33 width=417) (actual time=13.003..13.006 rows=1 loops=1)

5. 0.000 0.000 ↓ 0.0 0 1

Index Scan using "ToastCard_pkey" on "ToastCard" houseaccount (cost=0.43..8.45 rows=1 width=24) (actual time=0.000..0.000 rows=0 loops=1)

  • Index Cond: (op.houseaccount_id = id)
6. 13.005 13.005 ↑ 33.0 1 1

Nested Loop Left Join (cost=2,225.03..2,789.95 rows=33 width=421) (actual time=13.002..13.005 rows=1 loops=1)

7. 0.000 0.000 ↓ 0.0 0 1

Index Scan using "Day_pkey" on "Day" voidday (cost=0.43..8.00 rows=1 width=12) (actual time=0.000..0.000 rows=0 loops=1)

  • Index Cond: (voidinfo.voiddate_day_id = id)
8. 0.002 0.002 ↓ 0.0 0 1

Index Scan using "VoidReason_pkey" on "VoidReason" voidreason (cost=0.29..7.82 rows=1 width=24) (actual time=0.001..0.002 rows=0 loops=1)

9. 2.828 13.004 ↑ 33.0 1 1

Hash Right Join (cost=2,224.74..2,531.51 rows=33 width=413) (actual time=13.000..13.004 rows=1 loops=1)

  • Index Cond: (voidinfo.voidreason_id = id)
  • Hash Cond: (voidapproverexternal.restaurantuser_id = voidapprover.id)
10. 3.544 3.544 ↓ 1.0 12,878 1

Seq Scan on "RestaurantUserExternalIdentifier" voidapproverexternal (cost=0.00..259.10 rows=12,710 width=23) (actual time=0.002..3.544 rows=12,878 loops=1)

11. 0.004 6.632 ↑ 33.0 1 1

Hash (cost=2,224.33..2,224.33 rows=33 width=406) (actual time=6.632..6.632 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
12. 0.002 6.628 ↑ 33.0 1 1

Nested Loop Left Join (cost=1,654.19..2,224.33 rows=33 width=406) (actual time=6.625..6.628 rows=1 loops=1)

13. 0.000 0.000 ↓ 0.0 0 1

Index Scan using "RestaurantUser_pkey" on "RestaurantUser" voidapprover (cost=0.42..7.98 rows=1 width=24) (actual time=0.000..0.000 rows=0 loops=1)

14. 2.785 6.626 ↑ 33.0 1 1

Hash Right Join (cost=1,653.76..1,960.54 rows=33 width=390) (actual time=6.623..6.626 rows=1 loops=1)

  • Index Cond: (voidinfo.voidapprover_id = id)
  • Hash Cond: (voiduserexternal.restaurantuser_id = voiduser.id)
15. 3.774 3.774 ↓ 1.0 12,878 1

Seq Scan on "RestaurantUserExternalIdentifier" voiduserexternal (cost=0.00..259.10 rows=12,710 width=23) (actual time=0.005..3.774 rows=12,878 loops=1)

16. 0.004 0.067 ↑ 33.0 1 1

Hash (cost=1,653.35..1,653.35 rows=33 width=383) (actual time=0.067..0.067 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
17. 0.002 0.063 ↑ 33.0 1 1

Nested Loop Left Join (cost=16.82..1,653.35 rows=33 width=383) (actual time=0.058..0.063 rows=1 loops=1)

18. 0.061 0.061 ↑ 33.0 1 1

Nested Loop Left Join (cost=16.39..1,389.56 rows=33 width=367) (actual time=0.057..0.061 rows=1 loops=1)

19. 0.000 0.000 ↓ 0.0 0 1

Index Scan using "RestaurantUser_pkey" on "RestaurantUser" voiduser (cost=0.42..7.98 rows=1 width=24) (actual time=0.000..0.000 rows=0 loops=1)

  • Index Cond: (voidinfo.voiduser_id = id)
20. 0.060 0.060 ↑ 33.0 1 1

Nested Loop Left Join (cost=15.96..1,110.46 rows=33 width=335) (actual time=0.056..0.060 rows=1 loops=1)

21. 0.000 0.000 ↓ 0.0 0 1

Index Scan using "VoidInfo_pkey" on "VoidInfo" voidinfo (cost=0.43..8.45 rows=1 width=48) (actual time=0.000..0.000 rows=0 loops=1)

  • Index Cond: (op.voidinfo_id = id)
22. 0.057 0.057 ↑ 33.0 1 1

Nested Loop Left Join (cost=15.53..845.75 rows=33 width=339) (actual time=0.055..0.057 rows=1 loops=1)

23. 0.000 0.000 ↓ 0.0 0 1

Index Scan using "Day_pkey" on "Day" refundday (cost=0.43..8.01 rows=1 width=12) (actual time=0.000..0.000 rows=0 loops=1)

  • Index Cond: (refund.refunddate_day_id = id)
24. 0.051 0.051 ↑ 33.0 1 1

Nested Loop Left Join (cost=15.23..575.19 rows=33 width=314) (actual time=0.049..0.051 rows=1 loops=1)

25. 0.000 0.005 ↓ 0.0 0 1

Index Scan using "Refund_originalpayment_id_unique_idx" on "Refund" refund (cost=0.29..8.19 rows=1 width=33) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: (op.id = originalpayment_id)
26. 0.050 0.050 ↑ 33.0 1 1

Nested Loop Left Join (cost=14.95..308.87 rows=33 width=306) (actual time=0.047..0.050 rows=1 loops=1)

27. 0.000 0.000 ↓ 0.0 0 1

Index Scan using "CashDrawer_pkey" on "CashDrawer" (cost=0.29..8.06 rows=1 width=24) (actual time=0.000..0.000 rows=0 loops=1)

  • Index Cond: (op.cashdrawer_id = id)
28. 0.010 0.010 ↑ 1.0 1 1

Index Scan using "Day_pkey" on "Day" paidday (cost=0.43..8.45 rows=1 width=12) (actual time=0.008..0.010 rows=1 loops=1)

29. 0.016 0.038 ↑ 33.0 1 1

Hash Right Join (cost=14.51..29.61 rows=33 width=310) (actual time=0.037..0.038 rows=1 loops=1)

  • Index Cond: (op.paiddate_day_id = id)
  • Hash Cond: (eid.payment_id = op.id)
30. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on "OrderPaymentExternalIdentifier" eid (cost=0.00..13.70 rows=370 width=148) (actual time=0.001..0.001 rows=0 loops=1)

31. 0.005 0.021 ↑ 33.0 1 1

Hash (cost=14.10..14.10 rows=33 width=170) (actual time=0.021..0.021 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
32. 0.016 0.016 ↑ 33.0 1 1

Index Scan using orderpayment__check_id on "OrderPayment" op (cost=0.57..14.10 rows=33 width=170) (actual time=0.015..0.016 rows=1 loops=1)

  • Index Cond: (check_id = '300000004443297302'::bigint)
Execution time : 13.404 ms