explain.depesz.com

PostgreSQL's explain analyze made readable

Result: edZn : Original

Settings
# exclusive inclusive rows x rows loops node
1. 0.034 5,012.728 ↑ 1.0 10 1

Limit (cost=14,634.20..14,634.23 rows=10 width=44) (actual time=5,012.694..5,012.728 rows=10 loops=1)

  • Buffers: shared hit=48475 read=13625
  • I/O Timings: read=4921.007
2. 0.437 5,012.694 ↑ 41.4 10 1

Sort (cost=14,634.20..14,635.24 rows=414 width=44) (actual time=5,012.694..5,012.694 rows=10 loops=1)

  • Sort Key: d.created DESC, d.donationid DESC
  • Sort Method: top-N heapsort Memory: 25kB
  • Buffers: shared hit=48475 read=13625
  • I/O Timings: read=4921.007
3. 1.658 5,012.257 ↓ 8.0 3,293 1

HashAggregate (cost=14,616.98..14,621.12 rows=414 width=44) (actual time=5,011.635..5,012.257 rows=3,293 loops=1)

  • Group Key: ('donation'::text), d.donationid, d.created
  • Buffers: shared hit=48469 read=13625
  • I/O Timings: read=4921.007
4.          

CTE instantfundraisingpromomatchgpsreturnedtograntaccount

5. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=6.50..4,506.15 rows=57 width=4) (never executed)

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

Nested Loop (cost=6.07..4,383.33 rows=230 width=12) (never executed)

7. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=5.63..564.40 rows=43 width=12) (never executed)

8. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=5.20..538.07 rows=43 width=12) (never executed)

9. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on giftpurchase giftpurchase_3 (cost=4.76..174.07 rows=43 width=12) (never executed)

  • Recheck Cond: (purchasedonorid = 3511331)
10. 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)
11. 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)
12. 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)
13. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (giftpurchaseid = giftpurchase_3.promomatchgpid)
14. 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)
15.          

CTE instantfundraisinggiftpurchaseandpromomatchids

16. 0.001 1.422 ↓ 0.0 0 1

Unique (cost=729.09..729.10 rows=2 width=4) (actual time=1.422..1.422 rows=0 loops=1)

  • Buffers: shared hit=10 read=4
  • I/O Timings: read=1.378
17. 0.006 1.421 ↓ 0.0 0 1

Sort (cost=729.09..729.10 rows=2 width=4) (actual time=1.421..1.421 rows=0 loops=1)

  • Sort Key: giftpurchase_4.id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=10 read=4
  • I/O Timings: read=1.378
18. 0.002 1.415 ↓ 0.0 0 1

Append (cost=5.20..729.08 rows=2 width=4) (actual time=1.415..1.415 rows=0 loops=1)

  • Buffers: shared hit=10 read=4
  • I/O Timings: read=1.378
19. 0.003 1.404 ↓ 0.0 0 1

Nested Loop (cost=5.20..538.07 rows=1 width=4) (actual time=1.404..1.404 rows=0 loops=1)

  • Buffers: shared hit=5 read=4
  • I/O Timings: read=1.378
20. 0.326 0.335 ↑ 21.5 2 1

Bitmap Heap Scan on giftpurchase giftpurchase_4 (cost=4.76..174.07 rows=43 width=8) (actual time=0.009..0.335 rows=2 loops=1)

  • Recheck Cond: (purchasedonorid = 3511331)
  • Heap Blocks: exact=2
  • Buffers: shared hit=4 read=1
  • I/O Timings: read=0.322
21. 0.009 0.009 ↑ 21.5 2 1

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

  • Index Cond: (purchasedonorid = 3511331)
  • Buffers: shared hit=3
22. 1.066 1.066 ↓ 0.0 0 2

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.533..0.533 rows=0 loops=2)

  • Index Cond: (id = giftpurchase_4.cart_item)
  • Filter: (intended_project IS NOT NULL)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=1 read=3
  • I/O Timings: read=1.056
23. 0.000 0.009 ↓ 0.0 0 1

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

  • Buffers: shared hit=5
24. 0.002 0.009 ↓ 0.0 0 1

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

  • Recheck Cond: (purchasedonorid = 3511331)
  • Filter: (promomatchgpid IS NOT NULL)
  • Rows Removed by Filter: 2
  • Heap Blocks: exact=2
  • Buffers: shared hit=5
25. 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
26. 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)
27. 0.235 5,010.599 ↓ 8.0 3,293 1

Append (cost=1,981.31..9,378.62 rows=414 width=44) (actual time=3,891.552..5,010.599 rows=3,293 loops=1)

  • Buffers: shared hit=48469 read=13625
  • I/O Timings: read=4921.007
28. 0.446 3,892.269 ↓ 3,286.0 3,286 1

Unique (cost=1,981.31..1,981.32 rows=1 width=44) (actual time=3,891.552..3,892.269 rows=3,286 loops=1)

  • Buffers: shared hit=18897 read=10643
  • I/O Timings: read=3836.837
29. 2.471 3,891.823 ↓ 3,286.0 3,286 1

Sort (cost=1,981.31..1,981.32 rows=1 width=44) (actual time=3,891.551..3,891.823 rows=3,286 loops=1)

  • Sort Key: d.donationid, d.created
  • Sort Method: quicksort Memory: 353kB
  • Buffers: shared hit=18897 read=10643
  • I/O Timings: read=3836.837
30. 1.476 3,889.352 ↓ 3,286.0 3,286 1

Nested Loop Left Join (cost=92.23..1,981.30 rows=1 width=44) (actual time=5.376..3,889.352 rows=3,286 loops=1)

  • Filter: ((promoproposal.createduserid IS NULL) OR (promogp.purchasedonorid = 3511331))
  • Buffers: shared hit=18897 read=10643
  • I/O Timings: read=3836.837
31. 1.333 3,887.876 ↓ 3,286.0 3,286 1

Nested Loop Left Join (cost=91.80..1,980.69 rows=1 width=20) (actual time=5.375..3,887.876 rows=3,286 loops=1)

  • Buffers: shared hit=18897 read=10643
  • I/O Timings: read=3836.837
32. 0.679 3,886.543 ↓ 3,286.0 3,286 1

Nested Loop Left Join (cost=91.36..1,979.84 rows=1 width=20) (actual time=5.374..3,886.543 rows=3,286 loops=1)

  • Buffers: shared hit=18897 read=10643
  • I/O Timings: read=3836.837
33. 1.167 3,882.578 ↓ 3,286.0 3,286 1

Hash Left Join (cost=90.93..1,979.37 rows=1 width=16) (actual time=5.373..3,882.578 rows=3,286 loops=1)

  • Hash Cond: (gpitem.intended_project = dcproposal.proposalid)
  • Filter: ((dcproposal.createduserid IS NULL) OR (giftpurchase.purchasedonorid = 3511331))
  • Buffers: shared hit=18885 read=10637
  • I/O Timings: read=3834.548
34. 2.433 3,880.308 ↓ 7.7 3,286 1

Nested Loop Left Join (cost=2.62..1,889.45 rows=425 width=24) (actual time=4.256..3,880.308 rows=3,286 loops=1)

  • Buffers: shared hit=18885 read=10634
  • I/O Timings: read=3833.454
35. 1.639 3,003.799 ↓ 26.5 3,286 1

Nested Loop Left Join (cost=0.87..1,267.42 rows=124 width=16) (actual time=3.536..3,003.799 rows=3,286 loops=1)

  • Buffers: shared hit=8071 read=8196
  • I/O Timings: read=2974.702
36. 1,083.136 1,083.136 ↓ 26.5 3,286 1

Index Scan using dcdonation_altindex1 on dcdonation d (cost=0.43..217.45 rows=124 width=12) (actual time=1.968..1,083.136 rows=3,286 loops=1)

  • Index Cond: (donorid = 3511331)
  • Buffers: shared hit=163 read=2943
  • I/O Timings: read=1075.845
37. 1,919.024 1,919.024 ↑ 1.0 1 3,286

Index Scan using giving_cart_item_donation on giving_cart_item donationitem (cost=0.44..8.46 rows=1 width=8) (actual time=0.583..0.584 rows=1 loops=3,286)

  • Index Cond: (donation = d.donationid)
  • Filter: ((type)::text = 'proposal_donation'::text)
  • Buffers: shared hit=7908 read=5253
  • I/O Timings: read=1898.857
38. 0.000 874.076 ↓ 0.0 0 3,286

Nested Loop Left Join (cost=1.74..5.00 rows=2 width=16) (actual time=0.266..0.266 rows=0 loops=3,286)

  • Buffers: shared hit=10814 read=2438
  • I/O Timings: read=858.752
39. 1.350 874.076 ↓ 0.0 0 3,286

Nested Loop Left Join (cost=1.30..3.31 rows=2 width=16) (actual time=0.266..0.266 rows=0 loops=3,286)

  • Buffers: shared hit=10814 read=2438
  • I/O Timings: read=858.752
40. 0.000 864.218 ↓ 0.0 0 3,286

Nested Loop Left Join (cost=0.88..2.36 rows=2 width=8) (actual time=0.263..0.263 rows=0 loops=3,286)

  • Buffers: shared hit=10808 read=2420
  • I/O Timings: read=850.303
41. 857.646 857.646 ↓ 0.0 0 3,286

Index Scan using giving_cart_item_cart on giving_cart_item redemptionitem (cost=0.44..0.77 rows=2 width=8) (actual time=0.261..0.261 rows=0 loops=3,286)

  • Index Cond: (cart = donationitem.cart)
  • Filter: ((type)::text = 'gc_redemption'::text)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=10801 read=2403
  • I/O Timings: read=843.176
42. 7.182 7.182 ↑ 1.0 1 6

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

  • Index Cond: (id = redemptionitem.gift_code)
  • Buffers: shared hit=7 read=17
  • I/O Timings: read=7.127
43. 8.508 8.508 ↑ 1.0 1 6

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

  • Index Cond: (id = giftcode.giftpurchaseid)
  • Buffers: shared hit=6 read=18
  • I/O Timings: read=8.449
44. 0.000 0.000 ↓ 0.0 0 6

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=6)

  • Index Cond: (id = giftpurchase.cart_item)
45. 0.000 1.103 ↓ 0.0 0 1

Hash (cost=88.05..88.05 rows=21 width=8) (actual time=1.103..1.103 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared read=3
  • I/O Timings: read=1.094
46. 1.103 1.103 ↓ 0.0 0 1

Index Scan using dcproposal_createduserid on dcproposal (cost=0.43..88.05 rows=21 width=8) (actual time=1.103..1.103 rows=0 loops=1)

  • Index Cond: (createduserid = 3511331)
  • Buffers: shared read=3
  • I/O Timings: read=1.094
47. 3.286 3.286 ↓ 0.0 0 3,286

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

  • Index Cond: (promomatchgpid = giftcode.giftpurchaseid)
  • Buffers: shared hit=12 read=6
  • I/O Timings: read=2.289
48. 0.000 0.000 ↓ 0.0 0 3,286

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=3,286)

  • Index Cond: (id = promogp.cart_item)
49. 0.000 0.000 ↓ 0.0 0 3,286

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=3,286)

  • Index Cond: (promoitem.intended_project = proposalid)
  • Filter: (createduserid = 3511331)
50. 0.004 8.223 ↑ 32.2 6 1

Unique (cost=2,382.82..2,384.26 rows=193 width=44) (actual time=8.221..8.223 rows=6 loops=1)

  • Buffers: shared hit=23 read=23
  • I/O Timings: read=8.036
51. 0.017 8.219 ↑ 32.2 6 1

Sort (cost=2,382.82..2,383.30 rows=193 width=44) (actual time=8.219..8.219 rows=6 loops=1)

  • Sort Key: donationitem_1.donation, donationitem_1.create_date
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=23 read=23
  • I/O Timings: read=8.036
52. 0.002 8.202 ↑ 32.2 6 1

Nested Loop (cost=6.11..2,375.49 rows=193 width=44) (actual time=5.551..8.202 rows=6 loops=1)

  • Buffers: shared hit=23 read=23
  • I/O Timings: read=8.036
53. 0.003 6.770 ↑ 9.0 2 1

Nested Loop (cost=5.68..2,355.47 rows=18 width=4) (actual time=5.237..6.770 rows=2 loops=1)

  • Buffers: shared hit=17 read=18
  • I/O Timings: read=6.633
54. 0.003 5.009 ↑ 53.5 2 1

Nested Loop (cost=5.24..1,960.82 rows=107 width=4) (actual time=4.274..5.009 rows=2 loops=1)

  • Buffers: shared hit=14 read=13
  • I/O Timings: read=4.901
55. 0.319 3.076 ↑ 10.0 2 1

Bitmap Heap Scan on giftpurchase giftpurchase_1 (cost=4.80..174.22 rows=20 width=4) (actual time=3.075..3.076 rows=2 loops=1)

  • Recheck Cond: (purchasedonorid = 3511331)
  • Filter: ((sponsorgiftpurchaseid IS NULL) AND (NOT (hashed SubPlan 8)))
  • Heap Blocks: exact=2
  • Buffers: shared hit=11 read=8
  • I/O Timings: read=2.986
56. 1.334 1.334 ↑ 21.5 2 1

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

  • Index Cond: (purchasedonorid = 3511331)
  • Buffers: shared read=3
  • I/O Timings: read=1.316
57.          

SubPlan (for Bitmap Heap Scan)

58. 1.423 1.423 ↓ 0.0 0 1

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

  • Buffers: shared hit=10 read=4
  • I/O Timings: read=1.378
59. 1.930 1.930 ↑ 870.0 1 2

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

  • Index Cond: (giftpurchaseid = giftpurchase_1.id)
  • Buffers: shared hit=3 read=5
  • I/O Timings: read=1.915
60. 1.758 1.758 ↑ 30.0 1 2

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.879..0.879 rows=1 loops=2)

  • Index Cond: (gift_code = giftcode_1.id)
  • Filter: ((type)::text = 'gc_redemption'::text)
  • Buffers: shared hit=3 read=5
  • I/O Timings: read=1.732
61. 1.430 1.430 ↑ 2.0 3 2

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.700..0.715 rows=3 loops=2)

  • Index Cond: (cart = redemptionitem_1.cart)
  • Filter: ((type)::text = 'proposal_donation'::text)
  • Rows Removed by Filter: 2
  • Buffers: shared hit=6 read=5
  • I/O Timings: read=1.403
62. 0.000 0.060 ↓ 0.0 0 1

Unique (cost=2,602.52..2,604.05 rows=204 width=44) (actual time=0.060..0.060 rows=0 loops=1)

  • Buffers: shared hit=21
63. 0.012 0.060 ↓ 0.0 0 1

Sort (cost=2,602.52..2,603.03 rows=204 width=44) (actual time=0.060..0.060 rows=0 loops=1)

  • Sort Key: donationitem_2.donation, donationitem_2.create_date
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=21
64. 0.001 0.048 ↓ 0.0 0 1

Nested Loop (cost=6.39..2,594.69 rows=204 width=44) (actual time=0.048..0.048 rows=0 loops=1)

  • Buffers: shared hit=21
65. 0.002 0.047 ↓ 0.0 0 1

Nested Loop (cost=5.96..2,573.56 rows=19 width=4) (actual time=0.047..0.047 rows=0 loops=1)

  • Buffers: shared hit=21
66. 0.002 0.043 ↑ 9.5 2 1

Nested Loop (cost=5.68..2,466.43 rows=19 width=8) (actual time=0.036..0.043 rows=2 loops=1)

  • Buffers: shared hit=21
67. 0.003 0.031 ↑ 56.5 2 1

Nested Loop (cost=5.24..2,049.65 rows=113 width=8) (actual time=0.026..0.031 rows=2 loops=1)

  • Buffers: shared hit=13
68. 0.013 0.022 ↑ 10.5 2 1

Bitmap Heap Scan on giftpurchase giftpurchase_2 (cost=4.80..174.22 rows=21 width=8) (actual time=0.021..0.022 rows=2 loops=1)

  • Recheck Cond: (purchasedonorid = 3511331)
  • Filter: (NOT (hashed SubPlan 7))
  • Heap Blocks: exact=2
  • Buffers: shared hit=5
69. 0.008 0.008 ↑ 21.5 2 1

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

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

SubPlan (for Bitmap Heap Scan)

71. 0.001 0.001 ↓ 0.0 0 1

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

72. 0.006 0.006 ↑ 870.0 1 2

Index Scan using giftcode_altindex1 on giftcode giftcode_2 (cost=0.44..80.61 rows=870 width=8) (actual time=0.003..0.003 rows=1 loops=2)

  • Index Cond: (giftpurchaseid = giftpurchase_2.id)
  • Buffers: shared hit=8
73. 0.010 0.010 ↑ 30.0 1 2

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

  • Index Cond: (gift_code = giftcode_2.id)
  • Filter: ((type)::text = 'gc_redemption'::text)
  • Buffers: shared hit=8
74. 0.002 0.002 ↓ 0.0 0 2

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

  • Index Cond: (matchingid = giftpurchase_2.sponsormatchingid)
  • Heap Fetches: 0
75. 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)
76. 0.000 2.859 ↓ 0.0 0 1

Nested Loop (cost=176.34..441.20 rows=7 width=44) (actual time=2.859..2.859 rows=0 loops=1)

  • Buffers: shared hit=14 read=6
  • I/O Timings: read=2.770
77.          

Initplan (for Nested Loop)

78. 0.016 0.023 ↑ 1.0 1 1

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

  • Buffers: shared hit=5
79. 0.001 0.007 ↑ 21.5 2 1

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

  • Recheck Cond: (purchasedonorid = 3511331)
  • Heap Blocks: exact=2
  • Buffers: shared hit=5
80. 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
81. 2.483 2.483 ↑ 22.0 1 1

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

  • Index Cond: (giftpurchaseid = ANY ($10))
  • Filter: ((paymenttype)::text <> 'debit'::text)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=11 read=5
  • I/O Timings: read=2.405
82. 0.373 0.373 ↓ 0.0 0 1

Index Scan using pk_giftpurchase on giftpurchase gp (cost=1.71..9.74 rows=1 width=12) (actual time=0.373..0.373 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=3 read=1
  • I/O Timings: read=0.365
83.          

SubPlan (for Index Scan)

84. 0.000 0.000 ↓ 0.0 0

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

85. 0.000 0.953 ↓ 0.0 0 1

Nested Loop (cost=176.34..577.67 rows=1 width=44) (actual time=0.953..0.953 rows=0 loops=1)

  • Buffers: shared hit=15 read=2
  • I/O Timings: read=0.901
86.          

Initplan (for Nested Loop)

87. 0.012 0.026 ↑ 1.0 1 1

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

  • Buffers: shared hit=5
88. 0.003 0.014 ↑ 21.5 2 1

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

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

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

  • Index Cond: (purchasedonorid = 3511331)
  • Buffers: shared hit=3
90. 0.044 0.044 ↑ 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.040..0.044 rows=1 loops=1)

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

Index Scan using pk_giftpurchase on giftpurchase gp_1 (cost=1.71..9.74 rows=1 width=12) (actual time=0.908..0.908 rows=0 loops=1)

  • Index Cond: (id = payment_1.giftpurchaseid)
  • Filter: ((cart_item IS NULL) AND (sponsormatchingid IS NOT NULL) AND (credittype <> 3) AND (amount > '0'::numeric) AND (NOT (hashed SubPlan 4)))
  • Rows Removed by Filter: 1
  • Buffers: shared hit=2 read=2
  • I/O Timings: read=0.901
92.          

SubPlan (for Index Scan)

93. 0.000 0.000 ↓ 0.0 0

CTE Scan on instantfundraisingpromomatchgpsreturnedtograntaccount (cost=0.00..1.14 rows=57 width=4) (never executed)

94. 0.445 1,093.538 ↑ 7.0 1 1

Nested Loop (cost=0.87..692.99 rows=7 width=44) (actual time=1,093.367..1,093.538 rows=1 loops=1)

  • Buffers: shared hit=13274 read=2951
  • I/O Timings: read=1072.463
95. 1,079.949 1,079.949 ↓ 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=2.168..1,079.949 rows=3,286 loops=1)

  • Index Cond: (donor = 3511331)
  • Buffers: shared hit=70 read=2951
  • I/O Timings: read=1072.463
96. 13.144 13.144 ↓ 0.0 0 3,286

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

  • Index Cond: (cart = gc.id)
  • Filter: ((type)::text = 'gc_purchase'::text)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=13204
97. 0.060 12.462 ↓ 0.0 0 1

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

  • Buffers: shared hit=16225
98. 2.544 2.544 ↓ 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.544 rows=3,286 loops=1)

  • Index Cond: (donor = 3511331)
  • Buffers: shared hit=3021
99. 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..8.99 rows=1 width=16) (actual time=0.003..0.003 rows=0 loops=3,286)

  • Index Cond: (cart = gc_1.id)
  • Filter: ((type)::text = 'account_credit_purchase'::text)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=13204
Planning time : 74.365 ms
Execution time : 5,013.715 ms