explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nIob

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

Gather Merge (cost=18,792.71..18,935.88 rows=1,245 width=7,095) (actual rows= loops=)

  • Workers Planned: 1
2. 0.000 0.000 ↓ 0.0

Sort (cost=17,792.70..17,795.81 rows=1,245 width=7,095) (actual rows= loops=)

  • Sort Key: money_transaction.transaction_time DESC
3. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=12,693.32..13,938.19 rows=1,245 width=7,095) (actual rows= loops=)

  • Hash Cond: (money_transaction.id = ledger_pendingtransactionledgerentry.transaction_id)
4. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=12,607.65..13,849.26 rows=1,245 width=6,053) (actual rows= loops=)

  • Hash Cond: (money_transaction.id = ledger_ledgerentry.transaction_id)
5. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=12,374.55..13,612.89 rows=1,245 width=4,601) (actual rows= loops=)

  • Hash Cond: (money_transaction.bank_payment_reference_id = money_vendorpayment.id)
6. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=12,324.61..13,557.64 rows=1,245 width=3,858) (actual rows= loops=)

  • Hash Cond: (customer_user.accounting_policy_id = ledger_accountingpolicy.id)
7. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=12,322.31..13,551.91 rows=1,245 width=3,813) (actual rows= loops=)

  • Hash Cond: (service_subscription.owner_id = customer_user.id)
8. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=12,303.24..13,529.53 rows=1,245 width=3,507) (actual rows= loops=)

  • Hash Cond: (service_subscription.vendor_id = service_vendor.id)
9. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=8,985.80..10,197.18 rows=1,245 width=2,768) (actual rows= loops=)

  • Hash Cond: (money_transaction.subscription_id = service_subscription.id)
10. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=8,954.57..10,162.67 rows=1,245 width=2,542) (actual rows= loops=)

  • Hash Cond: (money_transaction.vendor_id = t8.id)
11. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on money_transaction (cost=5,637.12..6,837.09 rows=1,245 width=1,803) (actual rows= loops=)

  • Filter: ((required_for_computation OR required_for_ui_without_computation) AND ((hashed SubPlan 1) OR (((bank_payment_status)::text = ANY ('{inbound_initiated,outbound_initiated,outbound_tentatively_succeeded,inbound_reversal_initiated,cancel_initiated}'::text[])) AND (company_id = 1)) OR (((check_payment_status)::text = ANY ('{inbound_initiated,check_initiated,inbound_reversal_initiated,cancel_initiated}'::text[])) AND (company_id = 1))))
12.          

SubPlan (for Parallel Seq Scan)

13. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,229.45..5,637.12 rows=1 width=4) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,229.17..5,635.74 rows=1 width=8) (actual rows= loops=)

  • Filter: (((t3.id IS NULL) AND (money_transaction_1.preceding_related_transaction_id IS NULL)) OR ((t3.id IS NULL) AND ((money_transaction_1.type)::text = 'authorization.advice'::text)) OR ((t5.type IS NULL) AND ((money_transaction_1.type)::text = 'authorization.incremental'::text)) OR ((t7.type IS NULL) AND ((t3.type)::text = 'authorization.incremental'::text)))
15. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,228.89..4,084.72 rows=1,270 width=58) (actual rows= loops=)

  • Hash Cond: (money_transaction_1.preceding_related_transaction_id = t4.id)
16. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=0.85..2,853.35 rows=1,270 width=54) (actual rows= loops=)

  • Merge Cond: (money_transaction_1.id = t7.preceding_related_transaction_id)
17. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=0.56..2,142.54 rows=1,270 width=40) (actual rows= loops=)

  • Merge Cond: (money_transaction_1.id = t3.preceding_related_transaction_id)
  • Join Filter: money_transaction_1.required_for_computation
18. 0.000 0.000 ↓ 0.0

Index Scan using money_transaction_pkey on money_transaction money_transaction_1 (cost=0.28..1,438.42 rows=1,270 width=23) (actual rows= loops=)

  • Filter: (((state)::text = 'pending'::text) AND (company_id = 1))
19. 0.000 0.000 ↓ 0.0

Index Scan using money_transaction_preceding_related_transaction_id_e609591a on money_transaction t3 (cost=0.28..1,772.00 rows=4,212 width=22) (actual rows= loops=)

  • Filter: required_for_computation
20. 0.000 0.000 ↓ 0.0

Index Scan using money_transaction_preceding_related_transaction_id_e609591a on money_transaction t7 (cost=0.28..1,784.56 rows=5,022 width=18) (actual rows= loops=)

  • Filter: ((type)::text <> 'authorization.incremental'::text)
21. 0.000 0.000 ↓ 0.0

Hash (cost=1,165.24..1,165.24 rows=5,024 width=4) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Seq Scan on money_transaction t4 (cost=0.00..1,165.24 rows=5,024 width=4) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Index Scan using money_transaction_preceding_related_transaction_id_e609591a on money_transaction t5 (cost=0.28..1.20 rows=1 width=18) (actual rows= loops=)

  • Index Cond: (preceding_related_transaction_id = t4.id)
  • Filter: ((type)::text <> 'authorization.incremental'::text)
24. 0.000 0.000 ↓ 0.0

Index Only Scan using money_transaction_preceding_related_transaction_id_e609591a on money_transaction t6 (cost=0.28..1.38 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (preceding_related_transaction_id = t3.id)
25. 0.000 0.000 ↓ 0.0

Hash (cost=3,312.24..3,312.24 rows=416 width=739) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.42..3,312.24 rows=416 width=739) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Seq Scan on service_vendor t8 (cost=0.00..20.16 rows=416 width=413) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Index Scan using service_service_pkey on service_service t9 (cost=0.42..7.91 rows=1 width=326) (actual rows= loops=)

  • Index Cond: (id = t8.service_id)
29. 0.000 0.000 ↓ 0.0

Hash (cost=21.66..21.66 rows=766 width=226) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Seq Scan on service_subscription (cost=0.00..21.66 rows=766 width=226) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Hash (cost=3,312.24..3,312.24 rows=416 width=739) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.42..3,312.24 rows=416 width=739) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Seq Scan on service_vendor (cost=0.00..20.16 rows=416 width=413) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Index Scan using service_service_pkey on service_service (cost=0.42..7.91 rows=1 width=326) (actual rows= loops=)

  • Index Cond: (id = service_vendor.service_id)
35. 0.000 0.000 ↓ 0.0

Hash (cost=15.14..15.14 rows=314 width=306) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Seq Scan on customer_user (cost=0.00..15.14 rows=314 width=306) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Hash (cost=1.58..1.58 rows=58 width=45) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Seq Scan on ledger_accountingpolicy (cost=0.00..1.58 rows=58 width=45) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Hash (cost=46.85..46.85 rows=247 width=743) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=28.62..46.85 rows=247 width=743) (actual rows= loops=)

  • Hash Cond: (service_bill.requested_by_id = t12.id)
41. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=9.56..27.13 rows=247 width=437) (actual rows= loops=)

  • Hash Cond: (service_bill.id = money_vendorpayment.bill_id)
42. 0.000 0.000 ↓ 0.0

Seq Scan on service_bill (cost=0.00..16.82 rows=282 width=355) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Hash (cost=6.47..6.47 rows=247 width=82) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Seq Scan on money_vendorpayment (cost=0.00..6.47 rows=247 width=82) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

Hash (cost=15.14..15.14 rows=314 width=306) (actual rows= loops=)

46. 0.000 0.000 ↓ 0.0

Seq Scan on customer_user t12 (cost=0.00..15.14 rows=314 width=306) (actual rows= loops=)

47. 0.000 0.000 ↓ 0.0

Hash (cost=208.60..208.60 rows=1,960 width=1,452) (actual rows= loops=)

48. 0.000 0.000 ↓ 0.0

Seq Scan on ledger_ledgerentry (cost=0.00..208.60 rows=1,960 width=1,452) (actual rows= loops=)

49. 0.000 0.000 ↓ 0.0

Hash (cost=77.52..77.52 rows=652 width=1,042) (actual rows= loops=)

50. 0.000 0.000 ↓ 0.0

Seq Scan on ledger_pendingtransactionledgerentry (cost=0.00..77.52 rows=652 width=1,042) (actual rows= loops=)