explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9oT8 : year

Settings
# exclusive inclusive rows x rows loops node
1. 0.447 37.417 ↓ 12.5 1,210 1

Sort (cost=5,569.65..5,569.89 rows=97 width=44) (actual time=37.333..37.417 rows=1,210 loops=1)

  • Sort Key: d.created DESC, d.donationid DESC
  • Sort Method: quicksort Memory: 143kB
  • Buffers: shared hit=43407
2. 0.652 36.970 ↓ 12.5 1,210 1

HashAggregate (cost=5,564.51..5,565.48 rows=97 width=44) (actual time=36.743..36.970 rows=1,210 loops=1)

  • Group Key: ('donation'::text), d.donationid, d.created
  • Buffers: shared hit=43407
3.          

CTE instantfundraisingpromomatchgpsreturnedtograntaccount

4. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=6.49..1,087.83 rows=12 width=4) (never executed)

  • Join Filter: (accountcredit.donorid <> dcproposal_1.createduserid)
5. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=6.06..1,062.20 rows=48 width=12) (never executed)

6. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=5.62..255.87 rows=9 width=12) (never executed)

7. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=5.19..250.36 rows=9 width=12) (never executed)

8. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on giftpurchase giftpurchase_3 (cost=4.75..174.17 rows=9 width=12) (never executed)

  • Recheck Cond: (purchasedonorid = 3511331)
  • Filter: (createddate > '2018-12-31 00:00:00'::timestamp without time zone)
9. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on giftpurchase_purchasedonorid (cost=0.00..4.75 rows=43 width=0) (never executed)

  • Index Cond: (purchasedonorid = 3511331)
10. 0.000 0.000 ↓ 0.0 0

Index Scan using giving_cart_item_pkey on giving_cart_item (cost=0.44..8.46 rows=1 width=8) (never executed)

  • Index Cond: (id = giftpurchase_3.cart_item)
11. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_dcproposal on dcproposal dcproposal_1 (cost=0.43..0.60 rows=1 width=8) (never executed)

  • Index Cond: (proposalid = giving_cart_item.intended_project)
12. 0.000 0.000 ↓ 0.0 0

Index Scan using giftcode_altindex1 on giftcode giftcode_3 (cost=0.44..80.89 rows=870 width=8) (never executed)

  • Index Cond: (giftpurchaseid = giftpurchase_3.promomatchgpid)
13. 0.000 0.000 ↓ 0.0 0

Index Scan using accountcredit_giftcodeid on accountcredit (cost=0.43..0.51 rows=2 width=8) (never executed)

  • Index Cond: (giftcodeid = giftcode_3.id)
  • Filter: (credittype = 0)
14.          

CTE instantfundraisinggiftpurchaseandpromomatchids

15. 0.000 0.042 ↓ 0.0 0 1

Unique (cost=433.02..433.03 rows=2 width=4) (actual time=0.042..0.042 rows=0 loops=1)

  • Buffers: shared hit=14
16. 0.009 0.042 ↓ 0.0 0 1

Sort (cost=433.02..433.03 rows=2 width=4) (actual time=0.042..0.042 rows=0 loops=1)

  • Sort Key: giftpurchase_4.id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=14
17. 0.000 0.033 ↓ 0.0 0 1

Append (cost=5.19..433.01 rows=2 width=4) (actual time=0.033..0.033 rows=0 loops=1)

  • Buffers: shared hit=14
18. 0.003 0.025 ↓ 0.0 0 1

Nested Loop (cost=5.19..250.36 rows=1 width=4) (actual time=0.025..0.025 rows=0 loops=1)

  • Buffers: shared hit=9
19. 0.009 0.016 ↑ 9.0 1 1

Bitmap Heap Scan on giftpurchase giftpurchase_4 (cost=4.75..174.17 rows=9 width=8) (actual time=0.015..0.016 rows=1 loops=1)

  • Recheck Cond: (purchasedonorid = 3511331)
  • Filter: (createddate > '2018-12-31 00:00:00'::timestamp without time zone)
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=2
  • Buffers: shared hit=5
20. 0.007 0.007 ↑ 21.5 2 1

Bitmap Index Scan on giftpurchase_purchasedonorid (cost=0.00..4.75 rows=43 width=0) (actual time=0.007..0.007 rows=2 loops=1)

  • Index Cond: (purchasedonorid = 3511331)
  • Buffers: shared hit=3
21. 0.006 0.006 ↓ 0.0 0 1

Index Scan using giving_cart_item_pkey on giving_cart_item giving_cart_item_1 (cost=0.44..8.46 rows=1 width=4) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: (id = giftpurchase_4.cart_item)
  • Filter: (intended_project IS NOT NULL)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=4
22. 0.000 0.008 ↓ 0.0 0 1

Nested Loop (cost=5.19..182.63 rows=1 width=4) (actual time=0.008..0.008 rows=0 loops=1)

  • Buffers: shared hit=5
23. 0.002 0.008 ↓ 0.0 0 1

Bitmap Heap Scan on giftpurchase giftpurchase_5 (cost=4.75..174.17 rows=1 width=8) (actual time=0.008..0.008 rows=0 loops=1)

  • Recheck Cond: (purchasedonorid = 3511331)
  • Filter: ((promomatchgpid IS NOT NULL) AND (createddate > '2018-12-31 00:00:00'::timestamp without time zone))
  • Rows Removed by Filter: 2
  • Heap Blocks: exact=2
  • Buffers: shared hit=5
24. 0.006 0.006 ↑ 21.5 2 1

Bitmap Index Scan on giftpurchase_purchasedonorid (cost=0.00..4.75 rows=43 width=0) (actual time=0.006..0.006 rows=2 loops=1)

  • Index Cond: (purchasedonorid = 3511331)
  • Buffers: shared hit=3
25. 0.000 0.000 ↓ 0.0 0

Index Scan using giving_cart_item_pkey on giving_cart_item giving_cart_item_2 (cost=0.44..8.46 rows=1 width=4) (never executed)

  • Index Cond: (id = giftpurchase_5.cart_item)
  • Filter: (intended_project IS NOT NULL)
26. 0.093 36.318 ↓ 12.5 1,210 1

Append (cost=426.12..4,042.92 rows=97 width=44) (actual time=10.829..36.318 rows=1,210 loops=1)

  • Buffers: shared hit=43407
27. 0.160 11.061 ↓ 1,204.0 1,204 1

Unique (cost=426.12..426.13 rows=1 width=44) (actual time=10.829..11.061 rows=1,204 loops=1)

  • Buffers: shared hit=10888
28. 0.426 10.901 ↓ 1,204.0 1,204 1

Sort (cost=426.12..426.12 rows=1 width=44) (actual time=10.828..10.901 rows=1,204 loops=1)

  • Sort Key: d.donationid, d.created
  • Sort Method: quicksort Memory: 143kB
  • Buffers: shared hit=10888
29. 0.481 10.475 ↓ 1,204.0 1,204 1

Nested Loop Left Join (cost=4.47..426.11 rows=1 width=44) (actual time=0.038..10.475 rows=1,204 loops=1)

  • Filter: ((promoproposal.createduserid IS NULL) OR (promogp.purchasedonorid = 3511331))
  • Buffers: shared hit=10888
30. 0.374 9.994 ↓ 1,204.0 1,204 1

Nested Loop Left Join (cost=4.04..425.49 rows=1 width=20) (actual time=0.037..9.994 rows=1,204 loops=1)

  • Buffers: shared hit=10888
31. 0.420 9.620 ↓ 1,204.0 1,204 1

Nested Loop Left Join (cost=3.60..424.65 rows=1 width=20) (actual time=0.036..9.620 rows=1,204 loops=1)

  • Buffers: shared hit=10888
32. 0.578 9.200 ↓ 1,204.0 1,204 1

Nested Loop Left Join (cost=3.17..424.18 rows=1 width=16) (actual time=0.036..9.200 rows=1,204 loops=1)

  • Filter: ((dcproposal.createduserid IS NULL) OR (giftpurchase.purchasedonorid = 3511331))
  • Buffers: shared hit=10879
33. 0.316 5.010 ↓ 50.2 1,204 1

Nested Loop Left Join (cost=1.00..274.14 rows=24 width=16) (actual time=0.026..5.010 rows=1,204 loops=1)

  • Buffers: shared hit=6004
34. 1.082 1.082 ↓ 50.2 1,204 1

Index Scan using dcdonation_donorid_created on dcdonation d (cost=0.56..70.92 rows=24 width=12) (actual time=0.013..1.082 rows=1,204 loops=1)

  • Index Cond: ((donorid = 3511331) AND (created > '2018-12-31 00:00:00'::timestamp without time zone))
  • Buffers: shared hit=1176
35. 3.612 3.612 ↑ 1.0 1 1,204

Index Scan using giving_cart_item_donation on giving_cart_item donationitem (cost=0.44..8.46 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=1,204)

  • Index Cond: (donation = d.donationid)
  • Filter: ((type)::text = 'proposal_donation'::text)
  • Buffers: shared hit=4828
36. 0.000 3.612 ↓ 0.0 0 1,204

Nested Loop Left Join (cost=2.17..6.23 rows=2 width=16) (actual time=0.003..0.003 rows=0 loops=1,204)

  • Buffers: shared hit=4875
37. 0.000 3.612 ↓ 0.0 0 1,204

Nested Loop Left Join (cost=1.74..5.00 rows=2 width=16) (actual time=0.003..0.003 rows=0 loops=1,204)

  • Buffers: shared hit=4875
38. 0.000 3.612 ↓ 0.0 0 1,204

Nested Loop Left Join (cost=1.30..3.31 rows=2 width=16) (actual time=0.003..0.003 rows=0 loops=1,204)

  • Buffers: shared hit=4875
39. 1.186 3.612 ↓ 0.0 0 1,204

Nested Loop Left Join (cost=0.88..2.36 rows=2 width=8) (actual time=0.003..0.003 rows=0 loops=1,204)

  • Buffers: shared hit=4863
40. 2.408 2.408 ↓ 0.0 0 1,204

Index Scan using giving_cart_item_cart on giving_cart_item redemptionitem (cost=0.44..0.77 rows=2 width=8) (actual time=0.002..0.002 rows=0 loops=1,204)

  • Index Cond: (cart = donationitem.cart)
  • Filter: ((type)::text = 'gc_redemption'::text)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=4851
41. 0.018 0.018 ↑ 1.0 1 3

Index Scan using pk_giftcode on giftcode (cost=0.44..0.79 rows=1 width=8) (actual time=0.005..0.006 rows=1 loops=3)

  • Index Cond: (id = redemptionitem.gift_code)
  • Buffers: shared hit=12
42. 0.018 0.018 ↑ 1.0 1 3

Index Scan using pk_giftpurchase on giftpurchase (cost=0.43..0.46 rows=1 width=12) (actual time=0.006..0.006 rows=1 loops=3)

  • Index Cond: (id = giftcode.giftpurchaseid)
  • Buffers: shared hit=12
43. 0.000 0.000 ↓ 0.0 0 3

Index Scan using giving_cart_item_pkey on giving_cart_item gpitem (cost=0.44..0.83 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=3)

  • Index Cond: (id = giftpurchase.cart_item)
44. 0.000 0.000 ↓ 0.0 0 3

Index Scan using pk_dcproposal on dcproposal (cost=0.43..0.60 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=3)

  • Index Cond: (gpitem.intended_project = proposalid)
  • Filter: (createduserid = 3511331)
45. 0.000 0.000 ↓ 0.0 0 1,204

Index Scan using uix_giftpurchase_promomatchgpid on giftpurchase promogp (cost=0.43..0.46 rows=1 width=12) (actual time=0.000..0.000 rows=0 loops=1,204)

  • Index Cond: (promomatchgpid = giftcode.giftpurchaseid)
  • Buffers: shared hit=9
46. 0.000 0.000 ↓ 0.0 0 1,204

Index Scan using giving_cart_item_pkey on giving_cart_item promoitem (cost=0.44..0.83 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=1,204)

  • Index Cond: (id = promogp.cart_item)
47. 0.000 0.000 ↓ 0.0 0 1,204

Index Scan using pk_dcproposal on dcproposal promoproposal (cost=0.43..0.60 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=1,204)

  • Index Cond: (promoitem.intended_project = proposalid)
  • Filter: (createduserid = 3511331)
48. 0.001 0.128 ↑ 8.6 5 1

Unique (cost=616.26..616.58 rows=43 width=44) (actual time=0.126..0.128 rows=5 loops=1)

  • Buffers: shared hit=34
49. 0.013 0.127 ↑ 8.6 5 1

Sort (cost=616.26..616.37 rows=43 width=44) (actual time=0.126..0.127 rows=5 loops=1)

  • Sort Key: donationitem_1.donation, donationitem_1.create_date
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=34
50. 0.003 0.114 ↑ 8.6 5 1

Nested Loop (cost=6.11..615.10 rows=43 width=44) (actual time=0.109..0.114 rows=5 loops=1)

  • Buffers: shared hit=34
51. 0.002 0.099 ↑ 4.0 1 1

Nested Loop (cost=5.67..610.65 rows=4 width=4) (actual time=0.099..0.099 rows=1 loops=1)

  • Buffers: shared hit=27
52. 0.002 0.087 ↑ 21.0 1 1

Nested Loop (cost=5.24..533.19 rows=21 width=4) (actual time=0.087..0.087 rows=1 loops=1)

  • Buffers: shared hit=23
53. 0.024 0.079 ↑ 4.0 1 1

Bitmap Heap Scan on giftpurchase giftpurchase_1 (cost=4.80..174.32 rows=4 width=4) (actual time=0.079..0.079 rows=1 loops=1)

  • Recheck Cond: (purchasedonorid = 3511331)
  • Filter: ((sponsorgiftpurchaseid IS NULL) AND (createddate > '2018-12-31 00:00:00'::timestamp without time zone) AND (NOT (hashed SubPlan 8)))
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=2
  • Buffers: shared hit=19
54. 0.012 0.012 ↑ 21.5 2 1

Bitmap Index Scan on giftpurchase_purchasedonorid (cost=0.00..4.75 rows=43 width=0) (actual time=0.012..0.012 rows=2 loops=1)

  • Index Cond: (purchasedonorid = 3511331)
  • Buffers: shared hit=3
55.          

SubPlan (for Bitmap Heap Scan)

56. 0.043 0.043 ↓ 0.0 0 1

CTE Scan on instantfundraisinggiftpurchaseandpromomatchids instantfundraisinggiftpurchaseandpromomatchids_1 (cost=0.00..0.04 rows=2 width=4) (actual time=0.043..0.043 rows=0 loops=1)

  • Buffers: shared hit=14
57. 0.006 0.006 ↑ 870.0 1 1

Index Scan using giftcode_altindex1 on giftcode giftcode_1 (cost=0.44..81.02 rows=870 width=8) (actual time=0.006..0.006 rows=1 loops=1)

  • Index Cond: (giftpurchaseid = giftpurchase_1.id)
  • Buffers: shared hit=4
58. 0.010 0.010 ↑ 30.0 1 1

Index Scan using giving_cart_item_gift_code on giving_cart_item redemptionitem_1 (cost=0.44..3.39 rows=30 width=8) (actual time=0.010..0.010 rows=1 loops=1)

  • Index Cond: (gift_code = giftcode_1.id)
  • Filter: ((type)::text = 'gc_redemption'::text)
  • Buffers: shared hit=4
59. 0.012 0.012 ↑ 1.2 5 1

Index Scan using giving_cart_item_cart on giving_cart_item donationitem_1 (cost=0.44..1.05 rows=6 width=16) (actual time=0.008..0.012 rows=5 loops=1)

  • Index Cond: (cart = redemptionitem_1.cart)
  • Filter: ((type)::text = 'proposal_donation'::text)
  • Rows Removed by Filter: 2
  • Buffers: shared hit=7
60. 0.001 0.039 ↓ 0.0 0 1

Unique (cost=649.48..649.80 rows=43 width=44) (actual time=0.039..0.039 rows=0 loops=1)

  • Buffers: shared hit=5
61. 0.008 0.038 ↓ 0.0 0 1

Sort (cost=649.48..649.59 rows=43 width=44) (actual time=0.038..0.038 rows=0 loops=1)

  • Sort Key: donationitem_2.donation, donationitem_2.create_date
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=5
62. 0.000 0.030 ↓ 0.0 0 1

Nested Loop (cost=6.39..648.32 rows=43 width=44) (actual time=0.030..0.030 rows=0 loops=1)

  • Buffers: shared hit=5
63. 0.000 0.030 ↓ 0.0 0 1

Nested Loop (cost=5.95..643.87 rows=4 width=4) (actual time=0.030..0.030 rows=0 loops=1)

  • Buffers: shared hit=5
64. 0.002 0.031 ↓ 0.0 0 1

Nested Loop (cost=5.51..566.41 rows=21 width=4) (actual time=0.030..0.031 rows=0 loops=1)

  • Buffers: shared hit=5
65. 0.005 0.029 ↓ 0.0 0 1

Nested Loop (cost=5.08..207.54 rows=4 width=4) (actual time=0.029..0.029 rows=0 loops=1)

  • Buffers: shared hit=5
66. 0.018 0.024 ↑ 4.0 1 1

Bitmap Heap Scan on giftpurchase giftpurchase_2 (cost=4.80..174.32 rows=4 width=8) (actual time=0.024..0.024 rows=1 loops=1)

  • Recheck Cond: (purchasedonorid = 3511331)
  • Filter: ((createddate > '2018-12-31 00:00:00'::timestamp without time zone) AND (NOT (hashed SubPlan 7)))
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=2
  • Buffers: shared hit=5
67. 0.006 0.006 ↑ 21.5 2 1

Bitmap Index Scan on giftpurchase_purchasedonorid (cost=0.00..4.75 rows=43 width=0) (actual time=0.006..0.006 rows=2 loops=1)

  • Index Cond: (purchasedonorid = 3511331)
  • Buffers: shared hit=3
68.          

SubPlan (for Bitmap Heap Scan)

69. 0.000 0.000 ↓ 0.0 0 1

CTE Scan on instantfundraisinggiftpurchaseandpromomatchids (cost=0.00..0.04 rows=2 width=4) (actual time=0.000..0.000 rows=0 loops=1)

70. 0.000 0.000 ↓ 0.0 0 1

Index Only Scan using matching_pkey on matching (cost=0.28..8.29 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=1)

  • Index Cond: (matchingid = giftpurchase_2.sponsormatchingid)
  • Heap Fetches: 0
71. 0.000 0.000 ↓ 0.0 0

Index Scan using giftcode_altindex1 on giftcode giftcode_2 (cost=0.44..81.02 rows=870 width=8) (never executed)

  • Index Cond: (giftpurchaseid = giftpurchase_2.id)
72. 0.000 0.000 ↓ 0.0 0

Index Scan using giving_cart_item_gift_code on giving_cart_item redemptionitem_2 (cost=0.44..3.39 rows=30 width=8) (never executed)

  • Index Cond: (gift_code = giftcode_2.id)
  • Filter: ((type)::text = 'gc_redemption'::text)
73. 0.000 0.000 ↓ 0.0 0

Index Scan using giving_cart_item_cart on giving_cart_item donationitem_2 (cost=0.44..1.05 rows=6 width=16) (never executed)

  • Index Cond: (cart = redemptionitem_2.cart)
  • Filter: ((type)::text = 'proposal_donation'::text)
74. 0.000 0.045 ↓ 0.0 0 1

Nested Loop (cost=175.34..418.94 rows=7 width=44) (actual time=0.045..0.045 rows=0 loops=1)

  • Buffers: shared hit=13
75.          

Initplan (for Nested Loop)

76. 0.012 0.024 ↑ 1.0 1 1

Aggregate (cost=174.19..174.20 rows=1 width=32) (actual time=0.024..0.024 rows=1 loops=1)

  • Buffers: shared hit=5
77. 0.005 0.012 ↑ 9.0 1 1

Bitmap Heap Scan on giftpurchase gp_3 (cost=4.75..174.17 rows=9 width=4) (actual time=0.012..0.012 rows=1 loops=1)

  • Recheck Cond: (purchasedonorid = 3511331)
  • Filter: (createddate > '2018-12-31 00:00:00'::timestamp without time zone)
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=2
  • Buffers: shared hit=5
78. 0.007 0.007 ↑ 21.5 2 1

Bitmap Index Scan on giftpurchase_purchasedonorid (cost=0.00..4.75 rows=43 width=0) (actual time=0.006..0.007 rows=2 loops=1)

  • Index Cond: (purchasedonorid = 3511331)
  • Buffers: shared hit=3
79. 0.039 0.039 ↑ 22.0 1 1

Index Scan using payment_altindex2 on payment (cost=0.44..52.57 rows=22 width=4) (actual time=0.039..0.039 rows=1 loops=1)

  • Index Cond: (giftpurchaseid = ANY ($10))
  • Filter: ((paymenttype)::text <> 'debit'::text)
  • Buffers: shared hit=9
80. 0.005 0.005 ↓ 0.0 0 1

Index Scan using pk_giftpurchase on giftpurchase gp (cost=0.70..8.72 rows=1 width=12) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: (id = payment.giftpurchaseid)
  • Filter: ((cart_item IS NULL) AND (credittype <> 3) AND (amount > '0'::numeric) AND (NOT (hashed SubPlan 6)))
  • Rows Removed by Filter: 1
  • Buffers: shared hit=4
81.          

SubPlan (for Index Scan)

82. 0.000 0.000 ↓ 0.0 0

CTE Scan on instantfundraisingpromomatchgpsreturnedtograntaccount instantfundraisingpromomatchgpsreturnedtograntaccount_1 (cost=0.00..0.24 rows=12 width=4) (never executed)

83. 0.000 0.042 ↓ 0.0 0 1

Nested Loop (cost=175.33..541.31 rows=1 width=44) (actual time=0.042..0.042 rows=0 loops=1)

  • Buffers: shared hit=17
84.          

Initplan (for Nested Loop)

85. 0.009 0.017 ↑ 1.0 1 1

Aggregate (cost=174.18..174.19 rows=1 width=32) (actual time=0.017..0.017 rows=1 loops=1)

  • Buffers: shared hit=5
86. 0.002 0.008 ↑ 21.5 2 1

Bitmap Heap Scan on giftpurchase gp_2 (cost=4.76..174.07 rows=43 width=4) (actual time=0.007..0.008 rows=2 loops=1)

  • Recheck Cond: (purchasedonorid = 3511331)
  • Heap Blocks: exact=2
  • Buffers: shared hit=5
87. 0.006 0.006 ↑ 21.5 2 1

Bitmap Index Scan on giftpurchase_purchasedonorid (cost=0.00..4.75 rows=43 width=0) (actual time=0.006..0.006 rows=2 loops=1)

  • Index Cond: (purchasedonorid = 3511331)
  • Buffers: shared hit=3
88. 0.034 0.034 ↑ 36.0 1 1

Index Scan using payment_altindex2 on payment payment_1 (cost=0.44..52.57 rows=36 width=4) (actual time=0.032..0.034 rows=1 loops=1)

  • Index Cond: (giftpurchaseid = ANY ($8))
  • Filter: ((paymenttype)::text = 'debit'::text)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=13
89. 0.005 0.005 ↓ 0.0 0 1

Index Scan using pk_giftpurchase on giftpurchase gp_1 (cost=0.70..8.73 rows=1 width=12) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: (id = payment_1.giftpurchaseid)
  • Filter: ((cart_item IS NULL) AND (sponsormatchingid IS NOT NULL) AND (createddate > '2018-12-31 00:00:00'::timestamp without time zone) AND (credittype <> 3) AND (amount > '0'::numeric) AND (NOT (hashed SubPlan 4)))
  • Rows Removed by Filter: 1
  • Buffers: shared hit=4
90.          

SubPlan (for Index Scan)

91. 0.000 0.000 ↓ 0.0 0

CTE Scan on instantfundraisingpromomatchgpsreturnedtograntaccount (cost=0.00..0.24 rows=12 width=4) (never executed)

92. 0.192 12.565 ↑ 1.0 1 1

Nested Loop (cost=0.87..694.59 rows=1 width=44) (actual time=12.405..12.565 rows=1 loops=1)

  • Buffers: shared hit=16225
93. 2.515 2.515 ↓ 51.3 3,286 1

Index Scan using giving_cart_donor on giving_cart gc (cost=0.43..116.92 rows=64 width=4) (actual time=0.011..2.515 rows=3,286 loops=1)

  • Index Cond: (donor = 3511331)
  • Buffers: shared hit=3021
94. 9.858 9.858 ↓ 0.0 0 3,286

Index Scan using giving_cart_item_cart on giving_cart_item gci (cost=0.44..9.02 rows=1 width=16) (actual time=0.003..0.003 rows=0 loops=3,286)

  • Index Cond: (cart = gc.id)
  • Filter: ((create_date > '2018-12-31 00:00:00'::timestamp without time zone) AND ((type)::text = 'gc_purchase'::text))
  • Rows Removed by Filter: 1
  • Buffers: shared hit=13204
95. 0.000 12.345 ↓ 0.0 0 1

Nested Loop (cost=0.87..694.59 rows=1 width=44) (actual time=12.345..12.345 rows=0 loops=1)

  • Buffers: shared hit=16225
96. 2.506 2.506 ↓ 51.3 3,286 1

Index Scan using giving_cart_donor on giving_cart gc_1 (cost=0.43..116.92 rows=64 width=4) (actual time=0.011..2.506 rows=3,286 loops=1)

  • Index Cond: (donor = 3511331)
  • Buffers: shared hit=3021
97. 9.858 9.858 ↓ 0.0 0 3,286

Index Scan using giving_cart_item_cart on giving_cart_item gci_1 (cost=0.44..9.02 rows=1 width=16) (actual time=0.003..0.003 rows=0 loops=3,286)

  • Index Cond: (cart = gc_1.id)
  • Filter: ((create_date > '2018-12-31 00:00:00'::timestamp without time zone) AND ((type)::text = 'account_credit_purchase'::text))
  • Rows Removed by Filter: 1
  • Buffers: shared hit=13204
Planning time : 5.713 ms
Execution time : 38.370 ms