explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Clw

Settings
# exclusive inclusive rows x rows loops node
1. 8.100 1,567,031.261 ↓ 1.1 66,194 1

Append (cost=11,528,385.16..11,558,790.39 rows=58,165 width=979) (actual time=1,555,689.698..1,567,031.261 rows=66,194 loops=1)

2.          

CTE right_side

3. 25.958 707,808.413 ↑ 1.9 30,151 1

Hash Left Join (cost=5,856,302.10..5,865,339.30 rows=56,937 width=766) (actual time=707,381.904..707,808.413 rows=30,151 loops=1)

  • Hash Cond: (orders.order_id = mp.customerorderid)
4. 38.556 707,147.676 ↓ 63.9 30,151 1

Merge Right Join (cost=5,835,576.56..5,844,470.16 rows=472 width=688) (actual time=706,746.984..707,147.676 rows=30,151 loops=1)

  • Merge Cond: (a_1.payer_id = u_2.dopuserid)
5. 105.068 3,304.960 ↑ 1.3 26,540 1

GroupAggregate (cost=148,832.38..156,837.27 rows=33,817 width=164) (actual time=3,096.571..3,304.960 rows=26,540 loops=1)

  • Group Key: a_1.payer_id, a_1.error_code, a_1.error_desc
6. 936.007 3,199.892 ↑ 1.0 270,706 1

Sort (cost=148,832.38..149,529.35 rows=278,790 width=152) (actual time=3,096.551..3,199.892 rows=270,706 loops=1)

  • Sort Key: a_1.payer_id, a_1.error_code, a_1.error_desc
  • Sort Method: external sort Disk: 22728kB
7. 41.343 2,263.885 ↑ 1.0 270,706 1

Subquery Scan on a_1 (cost=88,015.99..102,652.47 rows=278,790 width=152) (actual time=1,843.858..2,263.885 rows=270,706 loops=1)

8. 246.291 2,222.542 ↑ 1.0 270,706 1

WindowAgg (cost=88,015.99..99,864.57 rows=278,790 width=160) (actual time=1,843.856..2,222.542 rows=270,706 loops=1)

9. 711.075 1,976.251 ↑ 1.0 270,706 1

Sort (cost=88,015.99..88,712.97 rows=278,790 width=143) (actual time=1,843.837..1,976.251 rows=270,706 loops=1)

  • Sort Key: pk.payer_id, pk.creation_date DESC
  • Sort Method: external merge Disk: 31152kB
10. 248.707 1,265.176 ↑ 1.0 270,706 1

Hash Join (cost=14,818.25..42,788.08 rows=278,790 width=143) (actual time=474.491..1,265.176 rows=270,706 loops=1)

  • Hash Cond: (pt.payment_id = pk.id)
11. 557.625 557.625 ↑ 1.0 276,774 1

Seq Scan on paymenttransaction pt (cost=0.00..14,749.96 rows=284,896 width=115) (actual time=9.497..557.625 rows=276,774 loops=1)

12. 94.725 458.844 ↓ 1.0 170,432 1

Hash (cost=10,266.58..10,266.58 rows=167,654 width=94) (actual time=458.842..458.844 rows=170,432 loops=1)

  • Buckets: 65536 Batches: 4 Memory Usage: 5864kB
13. 364.119 364.119 ↓ 1.0 170,432 1

Seq Scan on payment pk (cost=0.00..10,266.58 rows=167,654 width=94) (actual time=3.108..364.119 rows=170,432 loops=1)

  • Filter: (creation_date >= '2019-05-10 00:00:00'::timestamp without time zone)
  • Rows Removed by Filter: 3581
14. 18.007 703,804.160 ↓ 63.9 30,151 1

Materialize (cost=5,686,744.18..5,687,207.36 rows=472 width=524) (actual time=703,650.395..703,804.160 rows=30,151 loops=1)

15. 28.703 703,786.153 ↓ 63.9 30,151 1

Merge Left Join (cost=5,686,744.18..5,687,206.18 rows=472 width=524) (actual time=703,650.376..703,786.153 rows=30,151 loops=1)

  • Merge Cond: (d_u.dop_user_id = verification_event.dop_user_id)
  • Filter: ((orders.ordertype <> ALL ('{NEW_NUMBER,MNP_IN}'::text[])) OR (orders.order_status <> 'Cancelled'::text) OR (verification_event.verification_status IS NOT NULL))
  • Rows Removed by Filter: 1178
16. 246.022 23,690.806 ↓ 66.4 31,329 1

Sort (cost=435,440.19..435,441.37 rows=472 width=390) (actual time=23,631.866..23,690.806 rows=31,329 loops=1)

  • Sort Key: u_2.dopuserid
  • Sort Method: external merge Disk: 8920kB
17. 31.623 23,444.784 ↓ 66.4 31,329 1

Nested Loop (cost=430,128.38..435,419.23 rows=472 width=390) (actual time=11,280.292..23,444.784 rows=31,329 loops=1)

18. 101.396 11,492.941 ↓ 66.3 31,369 1

Hash Join (cost=430,127.95..434,572.36 rows=473 width=347) (actual time=11,234.462..11,492.941 rows=31,369 loops=1)

  • Hash Cond: (orders.owner_id = u_2.id)
19. 18.066 11,325.320 ↓ 66.3 31,372 1

Subquery Scan on orders (cost=423,921.55..426,994.46 rows=473 width=280) (actual time=11,166.850..11,325.320 rows=31,372 loops=1)

  • Filter: (orders.rownum = 1)
  • Rows Removed by Filter: 57221
20. 81.531 11,307.254 ↑ 1.1 88,593 1

WindowAgg (cost=423,921.55..425,812.57 rows=94,551 width=297) (actual time=11,166.845..11,307.254 rows=88,593 loops=1)

21. 668.980 11,225.723 ↑ 1.1 88,593 1

Sort (cost=423,921.55..424,157.93 rows=94,551 width=250) (actual time=11,166.830..11,225.723 rows=88,593 loops=1)

  • Sort Key: o_1.account_id, o_1.createddate DESC
  • Sort Method: external merge Disk: 14400kB
22. 105.963 10,556.743 ↑ 1.1 88,593 1

GroupAggregate (cost=399,122.42..404,795.48 rows=94,551 width=250) (actual time=10,206.380..10,556.743 rows=88,593 loops=1)

  • Group Key: o_1.order_id, x.state, x.npmessagecode, x.reasoncode, x.portingmode, x.processtype, o_1.ordertype, o_1.account_id, o_1.owner_id, o_1.orderstatus, x_1.oldvalue, o_1.shippingstatus, o_1.fulfilmentstatus, o_1.createddate, a_2.status, sim.delivery_type, sim.msisdn, sim.package
23. 1,258.690 10,450.780 ↓ 2.1 202,229 1

Sort (cost=399,122.42..399,358.80 rows=94,551 width=250) (actual time=10,206.357..10,450.780 rows=202,229 loops=1)

  • Sort Key: o_1.order_id, x.state, x.npmessagecode, x.reasoncode, x.portingmode, x.processtype, o_1.ordertype, o_1.account_id, o_1.owner_id, o_1.orderstatus, x_1.oldvalue, o_1.shippingstatus, o_1.fulfilmentstatus, o_1.createddate, a_2.status, sim.delivery_type, sim.msisdn, sim.package
  • Sort Method: external merge Disk: 32688kB
24. 61.916 9,192.090 ↓ 2.1 202,229 1

Hash Left Join (cost=297,409.32..379,996.34 rows=94,551 width=250) (actual time=8,221.335..9,192.090 rows=202,229 loops=1)

  • Hash Cond: (o_1.order_id = x_1.orderid)
25. 63.815 8,459.676 ↓ 2.1 202,229 1

Hash Left Join (cost=271,997.15..353,638.46 rows=94,551 width=240) (actual time=7,550.804..8,459.676 rows=202,229 loops=1)

  • Hash Cond: (o_1.order_id = np.order_id)
26. 205.481 8,270.275 ↓ 2.1 202,199 1

Hash Left Join (cost=269,280.37..350,207.39 rows=94,551 width=213) (actual time=7,425.168..8,270.275 rows=202,199 loops=1)

  • Hash Cond: (o_1.order_id = sim.order_id)
27. 167.425 1,202.136 ↓ 2.1 202,199 1

Hash Left Join (cost=11,791.51..87,163.32 rows=94,551 width=117) (actual time=558.135..1,202.136 rows=202,199 loops=1)

  • Hash Cond: (o_1.coodproductid = a_2.coodproductid)
28. 482.568 482.568 ↓ 2.1 202,199 1

Seq Scan on orderitems o_1 (cost=0.00..69,554.82 rows=94,551 width=147) (actual time=1.654..482.568 rows=202,199 loops=1)

  • Filter: ((orderstatus <> 'Draft'::text) AND (COALESCE(ordertype, 'NEW_NUMBER'::text) <> ALL ('{Modification,14DaysCancellation,PortOut}'::text[])) AND ((createddate)::date >= '2019-05-09'::date))
  • Rows Removed by Filter: 590584
29. 45.462 552.143 ↑ 1.0 125,167 1

Hash (cost=9,125.78..9,125.78 rows=125,178 width=44) (actual time=552.143..552.143 rows=125,167 loops=1)

  • Buckets: 131072 Batches: 2 Memory Usage: 5713kB
30. 506.681 506.681 ↑ 1.0 125,178 1

Seq Scan on assets a_2 (cost=0.00..9,125.78 rows=125,178 width=44) (actual time=10.438..506.681 rows=125,178 loops=1)

31. 95.360 6,862.658 ↓ 1.5 168,192 1

Hash (cost=254,099.35..254,099.35 rows=112,681 width=115) (actual time=6,862.658..6,862.658 rows=168,192 loops=1)

  • Buckets: 65536 Batches: 4 Memory Usage: 3136kB
32. 23.487 6,767.298 ↓ 1.5 168,192 1

Subquery Scan on sim (cost=235,979.55..254,099.35 rows=112,681 width=115) (actual time=3,333.886..6,767.298 rows=168,192 loops=1)

33. 2,625.854 6,743.811 ↓ 1.5 168,192 1

GroupAggregate (cost=235,979.55..252,972.54 rows=112,681 width=211) (actual time=3,333.884..6,743.811 rows=168,192 loops=1)

  • Group Key: o1.order_id
34. 3,683.889 4,117.957 ↑ 1.0 792,783 1

Sort (cost=235,979.55..237,962.82 rows=793,309 width=261) (actual time=3,333.800..4,117.957 rows=792,783 loops=1)

  • Sort Key: o1.order_id
  • Sort Method: external merge Disk: 200184kB
35. 434.068 434.068 ↑ 1.0 792,783 1

Seq Scan on orderitems o1 (cost=0.00..60,630.09 rows=793,309 width=261) (actual time=0.010..434.068 rows=792,783 loops=1)

36. 4.044 125.586 ↑ 1.0 14,700 1

Hash (cost=2,525.67..2,525.67 rows=15,289 width=46) (actual time=125.586..125.586 rows=14,700 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 1137kB
37. 7.521 121.542 ↑ 1.0 15,289 1

Hash Left Join (cost=1,887.73..2,525.67 rows=15,289 width=46) (actual time=91.032..121.542 rows=15,289 loops=1)

  • Hash Cond: (np.id = x.customerrequestid)
38. 27.873 27.873 ↑ 1.0 15,289 1

Seq Scan on numberportabilityrequests np (cost=0.00..560.89 rows=15,289 width=38) (actual time=4.856..27.873 rows=15,289 loops=1)

39. 2.781 86.148 ↓ 198.8 12,127 1

Hash (cost=1,886.96..1,886.96 rows=61 width=45) (actual time=86.148..86.148 rows=12,127 loops=1)

  • Buckets: 16384 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1022kB
40. 1.497 83.367 ↓ 198.8 12,128 1

Subquery Scan on x (cost=1,491.73..1,886.96 rows=61 width=45) (actual time=74.150..83.367 rows=12,128 loops=1)

  • Filter: (x.npc_rownumber = 1)
  • Rows Removed by Filter: 33
41. 6.850 81.870 ↑ 1.0 12,161 1

WindowAgg (cost=1,491.73..1,734.95 rows=12,161 width=513) (actual time=74.143..81.870 rows=12,161 loops=1)

42. 44.640 75.020 ↑ 1.0 12,161 1

Sort (cost=1,491.73..1,522.13 rows=12,161 width=53) (actual time=74.114..75.020 rows=12,161 loops=1)

  • Sort Key: npcase.customerrequestid, npcase.bpmprocesscreationdate DESC
  • Sort Method: quicksort Memory: 2093kB
43. 30.380 30.380 ↑ 1.0 12,161 1

Seq Scan on npcase (cost=0.00..666.61 rows=12,161 width=53) (actual time=3.889..30.380 rows=12,161 loops=1)

44. 3.446 670.498 ↓ 704.6 16,911 1

Hash (cost=25,411.87..25,411.87 rows=24 width=29) (actual time=670.498..670.498 rows=16,911 loops=1)

  • Buckets: 32768 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1298kB
45. 1.975 667.052 ↓ 704.6 16,911 1

Subquery Scan on x_1 (cost=25,257.82..25,411.87 rows=24 width=29) (actual time=656.270..667.052 rows=16,911 loops=1)

  • Filter: (x_1.latest = 1)
  • Rows Removed by Filter: 2
46. 7.724 665.077 ↓ 3.6 16,913 1

WindowAgg (cost=25,257.82..25,352.62 rows=4,740 width=77) (actual time=656.268..665.077 rows=16,913 loops=1)

47. 62.181 657.353 ↓ 3.6 16,913 1

Sort (cost=25,257.82..25,269.67 rows=4,740 width=37) (actual time=656.254..657.353 rows=16,913 loops=1)

  • Sort Key: ordershistory.orderid, ordershistory.createddate DESC
  • Sort Method: quicksort Memory: 2090kB
48. 595.172 595.172 ↓ 3.6 16,913 1

Seq Scan on ordershistory (cost=0.00..24,968.42 rows=4,740 width=37) (actual time=6.769..595.172 rows=16,913 loops=1)

  • Filter: ((field = 'Status'::text) AND (newvalue = 'Cancelled'::text))
  • Rows Removed by Filter: 600982
49. 34.100 66.225 ↑ 1.0 97,176 1

Hash (cost=3,662.70..3,662.70 rows=97,176 width=86) (actual time=66.224..66.225 rows=97,176 loops=1)

  • Buckets: 65536 Batches: 2 Memory Usage: 6288kB
50. 32.125 32.125 ↑ 1.0 97,176 1

Seq Scan on users u_2 (cost=0.00..3,662.70 rows=97,176 width=86) (actual time=0.017..32.125 rows=97,176 loops=1)

  • Filter: (email <> ALL ('{artstan2@gmail.com,mariusz.gaca@orange.com,artstan3@gmail.com,rafal.dop@prod.com}'::text[]))
  • Rows Removed by Filter: 4
51. 11,920.220 11,920.220 ↑ 1.0 1 31,369

Index Scan using users_pkey on users d_u (cost=0.42..1.79 rows=1 width=43) (actual time=0.380..0.380 rows=1 loops=31,369)

  • Index Cond: (dop_user_id = u_2.dopuserid)
  • Filter: ((NOT closed_record) AND (createddate >= '2019-05-09 00:00:00'::timestamp without time zone))
  • Rows Removed by Filter: 0
52. 4.270 680,066.644 ↓ 236.6 14,668 1

Materialize (cost=5,251,304.00..5,251,770.99 rows=62 width=171) (actual time=680,018.457..680,066.644 rows=14,668 loops=1)

53. 5.393 680,062.374 ↓ 236.6 14,668 1

Subquery Scan on verification_event (cost=5,251,304.00..5,251,770.84 rows=62 width=171) (actual time=680,018.447..680,062.374 rows=14,668 loops=1)

  • Filter: (verification_event.row_num = 1)
  • Rows Removed by Filter: 21449
54. 29.804 680,056.981 ↓ 2.9 36,117 1

WindowAgg (cost=5,251,304.00..5,251,615.12 rows=12,445 width=207) (actual time=680,018.431..680,056.981 rows=36,117 loops=1)

55. 150.234 680,027.177 ↓ 2.9 36,117 1

Sort (cost=5,251,304.00..5,251,335.11 rows=12,445 width=87) (actual time=680,018.370..680,027.177 rows=36,117 loops=1)

  • Sort Key: se_1.dop_user_id, onf.verified_at DESC
  • Sort Method: quicksort Memory: 6250kB
56. 45,906.751 679,876.943 ↓ 2.9 36,117 1

Hash Join (cost=1,379.59..5,250,457.53 rows=12,445 width=87) (actual time=178.777..679,876.943 rows=36,117 loops=1)

  • Hash Cond: (se_1.event_details_id = onf.event_details_id)
57. 633,803.308 633,803.308 ↓ 1.0 186,794,838 1

Seq Scan on subscriber_event se_1 (cost=0.00..4,758,903.64 rows=186,733,064 width=44) (actual time=5.621..633,803.308 rows=186,794,838 loops=1)

58. 9.041 166.884 ↓ 2.9 36,117 1

Hash (cost=1,224.03..1,224.03 rows=12,445 width=51) (actual time=166.884..166.884 rows=36,117 loops=1)

  • Buckets: 65536 (originally 16384) Batches: 1 (originally 1) Memory Usage: 3633kB
59. 157.843 157.843 ↓ 2.9 36,117 1

Seq Scan on kong_customer_verification_status_event onf (cost=0.00..1,224.03 rows=12,445 width=51) (actual time=8.274..157.843 rows=36,117 loops=1)

  • Filter: ((verified_at)::date >= '2019-05-09'::date)
  • Rows Removed by Filter: 1104
60. 7.469 634.779 ↑ 1.0 23,771 1

Hash (cost=20,423.96..20,423.96 rows=24,126 width=83) (actual time=634.778..634.779 rows=23,771 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 2478kB
61. 130.320 627.310 ↑ 1.0 23,772 1

HashAggregate (cost=19,941.44..20,182.70 rows=24,126 width=83) (actual time=616.477..627.310 rows=23,772 loops=1)

  • Group Key: mp.customerorderid
62. 68.485 496.990 ↓ 1.0 170,432 1

Hash Left Join (cost=1,232.66..12,397.01 rows=167,654 width=44) (actual time=71.828..496.990 rows=170,432 loops=1)

  • Hash Cond: (pk_1.order_id = mp._id)
63. 361.693 361.693 ↓ 1.0 170,432 1

Seq Scan on payment pk_1 (cost=0.00..10,266.58 rows=167,654 width=48) (actual time=4.767..361.693 rows=170,432 loops=1)

  • Filter: (creation_date >= '2019-05-10 00:00:00'::timestamp without time zone)
  • Rows Removed by Filter: 3581
64. 7.023 66.812 ↑ 1.0 27,496 1

Hash (cost=888.96..888.96 rows=27,496 width=44) (actual time=66.812..66.812 rows=27,496 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 2297kB
65. 59.789 59.789 ↑ 1.0 27,496 1

Seq Scan on mongo_payment mp (cost=0.00..888.96 rows=27,496 width=44) (actual time=3.627..59.789 rows=27,496 loops=1)

66. 57.848 1,566,967.327 ↓ 29.4 36,043 1

Merge Left Join (cost=5,663,045.86..5,692,157.73 rows=1,228 width=851) (actual time=1,555,689.695..1,566,967.327 rows=36,043 loops=1)

  • Merge Cond: (orders_commercial.dopuserid = all_onf.dop_user_id)
67. 15.494 731,760.994 ↓ 29.4 36,043 1

Nested Loop (cost=409,628.61..436,769.57 rows=1,228 width=281) (actual time=720,658.092..731,760.994 rows=36,043 loops=1)

68. 94.829 721,903.736 ↓ 29.9 36,723 1

Subquery Scan on orders_commercial (cost=409,628.19..426,822.18 rows=1,228 width=275) (actual time=720,640.052..721,903.736 rows=36,723 loops=1)

  • Filter: ((NOT (hashed SubPlan 2)) AND (orders_commercial.rn = 1))
  • Rows Removed by Filter: 117767
69. 104.488 13,904.155 ↑ 3.2 154,490 1

WindowAgg (cost=408,347.11..418,172.25 rows=491,257 width=347) (actual time=12,712.225..13,904.155 rows=154,490 loops=1)

70. 1,542.689 13,799.667 ↑ 3.2 154,490 1

Sort (cost=408,347.11..409,575.25 rows=491,257 width=275) (actual time=12,711.991..13,799.667 rows=154,490 loops=1)

  • Sort Key: a.dopuserid, a.createddate DESC
  • Sort Method: external merge Disk: 29704kB
71. 30.740 12,256.978 ↑ 3.2 154,490 1

Subquery Scan on a (cost=267,396.23..298,099.79 rows=491,257 width=275) (actual time=8,252.318..12,256.978 rows=154,490 loops=1)

72. 2,953.135 12,226.238 ↑ 3.2 154,490 1

GroupAggregate (cost=267,396.23..293,187.22 rows=491,257 width=349) (actual time=8,252.316..12,226.238 rows=154,490 loops=1)

  • Group Key: o.account_id, o.owner_id, o.order_id, o.orderstatus, o.ordertype, u_1.dopuserid, u_1.email, u_1.createddate
73. 4,855.301 9,273.103 ↓ 1.4 710,570 1

Sort (cost=267,396.23..268,624.37 rows=491,257 width=399) (actual time=8,252.020..9,273.103 rows=710,570 loops=1)

  • Sort Key: o.account_id, o.owner_id, o.order_id, o.orderstatus, o.ordertype, u_1.dopuserid, u_1.email, u_1.createddate
  • Sort Method: external merge Disk: 281168kB
74. 993.008 4,417.802 ↓ 1.4 710,570 1

Hash Join (cost=5,720.55..131,962.91 rows=491,257 width=399) (actual time=190.236..4,417.802 rows=710,570 loops=1)

  • Hash Cond: (o.owner_id = u_1.id)
  • Join Filter: ((o.ordertype IS NULL) OR ((o.ordertype = ANY ('{Migration,MNP_IN}'::text[])) AND ((o.createddate)::date >= '2019-05-09'::date) AND ((u_1.createddate)::date >= '2019-05-09'::date)))
  • Rows Removed by Join Filter: 15
75. 3,241.916 3,241.916 ↓ 1.4 710,585 1

Seq Scan on orderitems o (cost=0.00..66,579.91 rows=511,065 width=332) (actual time=6.929..3,241.916 rows=710,585 loops=1)

  • Filter: ((ordertype IS NULL) OR ((ordertype = ANY ('{Migration,MNP_IN}'::text[])) AND ((createddate)::date >= '2019-05-09'::date)))
  • Rows Removed by Filter: 82198
76. 45.702 182.878 ↑ 1.0 97,180 1

Hash (cost=3,176.80..3,176.80 rows=97,180 width=86) (actual time=182.878..182.878 rows=97,180 loops=1)

  • Buckets: 65536 Batches: 2 Memory Usage: 6326kB
77. 137.176 137.176 ↑ 1.0 97,180 1

Seq Scan on users u_1 (cost=0.00..3,176.80 rows=97,180 width=86) (actual time=4.544..137.176 rows=97,180 loops=1)

78.          

SubPlan (for Subquery Scan)

79. 707,904.752 707,904.752 ↑ 1.9 30,151 1

CTE Scan on right_side right_side_1 (cost=0.00..1,138.74 rows=56,937 width=32) (actual time=707,381.928..707,904.752 rows=30,151 loops=1)

80. 9,841.764 9,841.764 ↑ 1.0 1 36,723

Index Scan using users_pkey on users u (cost=0.42..8.10 rows=1 width=43) (actual time=0.268..0.268 rows=1 loops=36,723)

  • Index Cond: (dop_user_id = orders_commercial.dopuserid)
  • Filter: ((NOT closed_record) AND (createddate >= '2019-05-09 00:00:00'::timestamp without time zone))
  • Rows Removed by Filter: 0
81. 6.108 835,148.485 ↓ 80.7 15,092 1

Materialize (cost=5,253,417.25..5,255,378.27 rows=187 width=95) (actual time=835,031.560..835,148.485 rows=15,092 loops=1)

82. 9.599 835,142.377 ↓ 80.7 15,092 1

Subquery Scan on all_onf (cost=5,253,417.25..5,255,377.80 rows=187 width=95) (actual time=835,031.537..835,142.377 rows=15,092 loops=1)

  • Filter: (all_onf.onfido_rn = 1)
  • Rows Removed by Filter: 22129
83. 37.822 835,132.778 ↑ 1.0 37,221 1

WindowAgg (cost=5,253,417.25..5,254,910.65 rows=37,335 width=179) (actual time=835,031.530..835,132.778 rows=37,221 loops=1)

84. 48.598 835,094.956 ↑ 1.0 37,221 1

WindowAgg (cost=5,253,417.25..5,254,257.28 rows=37,335 width=171) (actual time=835,031.517..835,094.956 rows=37,221 loops=1)

85. 343.842 835,046.358 ↑ 1.0 37,221 1

Sort (cost=5,253,417.25..5,253,510.58 rows=37,335 width=131) (actual time=835,031.474..835,046.358 rows=37,221 loops=1)

  • Sort Key: se.dop_user_id, onfido.verified_at DESC
  • Sort Key: se.dop_user_id, onfido.verified_at DESC
  • Sort Method: external merge Disk: 5512kB
86. 52,957.104 834,702.516 ↑ 1.0 37,221 1

Hash Join (cost=1,504.04..5,250,581.98 rows=37,335 width=131) (actual time=166.978..834,702.516 rows=37,221 loops=1)

  • Hash Cond: (se.event_details_id = onfido.event_details_id)
87. 781,582.368 781,582.368 ↓ 1.0 186,794,838 1

Seq Scan on subscriber_event se (cost=0.00..4,758,903.64 rows=186,733,064 width=44) (actual time=0.032..781,582.368 rows=186,794,838 loops=1)

88. 10.997 163.044 ↑ 1.0 37,221 1

Hash (cost=1,037.35..1,037.35 rows=37,335 width=51) (actual time=163.044..163.044 rows=37,221 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 3746kB
89. 152.047 152.047 ↑ 1.0 37,221 1

Seq Scan on kong_customer_verification_status_event onfido (cost=0.00..1,037.35 rows=37,335 width=51) (actual time=5.060..152.047 rows=37,221 loops=1)

90. 55.834 55.834 ↑ 1.9 30,151 1

CTE Scan on right_side (cost=0.00..1,281.08 rows=56,937 width=982) (actual time=2.610..55.834 rows=30,151 loops=1)