explain.depesz.com

PostgreSQL's explain analyze made readable

Result: d1cp

Settings
# exclusive inclusive rows x rows loops node
1. 0.053 5,152.742 ↓ 6.0 6 1

Nested Loop Left Join (cost=274,427.95..274,444.40 rows=1 width=146) (actual time=5,151.393..5,152.742 rows=6 loops=1)

  • Output: u.name, act.act, connect.connect, ((((connect.connect)::double precision / (act.act)::double precision)) * '100'::double precision), rpc.rpc, opc.opc, tpc.tpc, oth.oth, ((((rpc.rpc)::double precision / (connect.connect)::double precision)) * '100'::double precision), prom.promsum, prom.promcount, ((((prom.promcount)::double precision / (rpc.rpc)::double precision)) * '100'::double precision), (sum(pp_1.totalamountpromise)), (((sum(pp_1.totalamountpromise)) / prom.promsum) * '100'::double precision), ((collection_oper_individual_plan.plan_promise / 21) * (('now'::cstring)::date - '2020-03-01'::date)), (prom.promsum / (((collection_oper_individual_plan.plan_promise / 21) * (('now'::cstring)::date - '2020-03-01'::date)))::double precision)
  • Join Filter: (u.name = u_1.name)
  • Rows Removed by Join Filter: 66
  • Buffers: shared hit=314245, temp read=4605 written=4605
2. 0.025 1,380.045 ↓ 6.0 6 1

Nested Loop (cost=125,169.33..125,172.58 rows=1 width=122) (actual time=1,380.018..1,380.045 rows=6 loops=1)

  • Output: u.name, act.act, connect.connect, (((connect.connect)::double precision / (act.act)::double precision)), rpc.rpc, opc.opc, tpc.tpc, oth.oth, (((rpc.rpc)::double precision / (connect.connect)::double precision)), prom.promsum, prom.promcount, (((prom.promcount)::double precision / (rpc.rpc)::double precision)), collection_oper_individual_plan.plan_promise
  • Join Filter: (u.name = collection_oper_individual_plan.name)
  • Rows Removed by Join Filter: 114
  • Buffers: shared hit=46023
3. 0.018 1,380.000 ↑ 3.5 20 1

Sort (cost=125,169.33..125,169.51 rows=69 width=118) (actual time=1,379.993..1,380.000 rows=20 loops=1)

  • Output: u.name, act.act, connect.connect, (((connect.connect)::double precision / (act.act)::double precision)), rpc.rpc, opc.opc, tpc.tpc, oth.oth, (((rpc.rpc)::double precision / (connect.connect)::double precision)), prom.promsum, prom.promcount, (((prom.promcount)::double precision / (rpc.rpc)::double precision))
  • Sort Key: act.act DESC
  • Sort Method: quicksort Memory: 29kB
  • Buffers: shared hit=46022
4. 0.040 1,379.982 ↑ 3.5 20 1

Hash Right Join (cost=125,160.65..125,167.23 rows=69 width=118) (actual time=1,379.948..1,379.982 rows=20 loops=1)

  • Output: u.name, act.act, connect.connect, ((connect.connect)::double precision / (act.act)::double precision), rpc.rpc, opc.opc, tpc.tpc, oth.oth, ((rpc.rpc)::double precision / (connect.connect)::double precision), prom.promsum, prom.promcount, ((prom.promcount)::double precision / (rpc.rpc)::double precision)
  • Hash Cond: (u.id = act.aid)
  • Buffers: shared hit=46022
5. 0.020 0.020 ↑ 1.0 97 1

Seq Scan on delta.collecting_users u (cost=0.00..3.97 rows=97 width=32) (actual time=0.010..0.020 rows=97 loops=1)

  • Output: u.id, u.groupid, u.ruleid, u.isgrouprule, u.name, u.login, u.passwd, u.ipphonecode, u.created, u.deleted, u.isdenyaccess, u.isreadonly, u.isblocked, u.comments, u.linkedusers, u.city, u.workaddress, u.photo, u.phonemobile, u.phonework, u.phoneinternal, u.applayregions, u.cardviewstage, u.sid, u.ipphonepassword, u.emaillogin, u.emailpassword, u.f778, u.f788, u.f796, u.f797, u.f829, u.email
  • Buffers: shared hit=3
6. 0.011 1,379.922 ↑ 3.5 20 1

Hash (cost=125,159.79..125,159.79 rows=69 width=66) (actual time=1,379.922..1,379.922 rows=20 loops=1)

  • Output: act.act, act.aid, connect.connect, rpc.rpc, opc.opc, tpc.tpc, oth.oth, prom.promsum, prom.promcount
  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared hit=46019
7. 0.008 1,379.911 ↑ 3.5 20 1

Merge Left Join (cost=125,152.43..125,159.79 rows=69 width=66) (actual time=1,379.859..1,379.911 rows=20 loops=1)

  • Output: act.act, act.aid, connect.connect, rpc.rpc, opc.opc, tpc.tpc, oth.oth, prom.promsum, prom.promcount
  • Merge Cond: (act.aid = prom.aid)
  • Buffers: shared hit=46019
8. 0.009 1,379.311 ↑ 3.5 20 1

Merge Left Join (cost=125,086.69..125,092.90 rows=69 width=50) (actual time=1,379.265..1,379.311 rows=20 loops=1)

  • Output: act.act, act.aid, connect.connect, rpc.rpc, opc.opc, tpc.tpc, oth.oth
  • Merge Cond: (act.aid = oth.aid)
  • Buffers: shared hit=45992
9. 0.011 1,062.843 ↑ 3.5 20 1

Merge Left Join (cost=101,431.60..101,436.60 rows=69 width=42) (actual time=1,062.802..1,062.843 rows=20 loops=1)

  • Output: act.act, act.aid, connect.connect, rpc.rpc, opc.opc, tpc.tpc
  • Merge Cond: (act.aid = tpc.aid)
  • Buffers: shared hit=38322
10. 0.009 913.142 ↑ 3.5 20 1

Merge Left Join (cost=82,794.70..82,798.50 rows=69 width=34) (actual time=913.111..913.142 rows=20 loops=1)

  • Output: act.act, act.aid, connect.connect, rpc.rpc, opc.opc
  • Merge Cond: (act.aid = opc.aid)
  • Buffers: shared hit=30652
11. 0.008 733.474 ↑ 3.5 20 1

Merge Left Join (cost=63,973.70..63,976.28 rows=69 width=26) (actual time=733.452..733.474 rows=20 loops=1)

  • Output: act.act, act.aid, connect.connect, rpc.rpc
  • Merge Cond: (act.aid = rpc.aid)
  • Buffers: shared hit=22982
12. 0.016 572.656 ↑ 3.5 20 1

Merge Left Join (cost=44,205.88..44,207.26 rows=69 width=18) (actual time=572.639..572.656 rows=20 loops=1)

  • Output: act.act, act.aid, connect.connect
  • Merge Cond: (act.aid = connect.aid)
  • Buffers: shared hit=15312
13. 0.017 182.681 ↑ 3.5 20 1

Sort (cost=19,057.58..19,057.75 rows=69 width=10) (actual time=182.676..182.681 rows=20 loops=1)

  • Output: act.act, act.aid
  • Sort Key: act.aid
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=7642
14. 0.004 182.664 ↑ 3.5 20 1

Subquery Scan on act (cost=19,054.09..19,055.47 rows=69 width=10) (actual time=182.659..182.664 rows=20 loops=1)

  • Output: act.act, act.aid
  • Buffers: shared hit=7642
15. 83.310 182.660 ↑ 3.5 20 1

HashAggregate (cost=19,054.09..19,054.78 rows=69 width=10) (actual time=182.657..182.660 rows=20 loops=1)

  • Output: h.aid, count(h.typeid)
  • Group Key: h.aid
  • Buffers: shared hit=7642
16. 99.350 99.350 ↑ 1.0 431,655 1

Index Scan using collecting_history_created_idx on delta.collecting_history h (cost=0.44..16,817.50 rows=447,318 width=7) (actual time=0.024..99.350 rows=431,655 loops=1)

  • Output: h.id, h.lid, h.cid, h.aid, h.typeid, h.text, h.created, h.notification, h.paymentdate, h.paymentvalue, h.ispayment, h.isnotify, h.isviewved, h.isdeclared, h.isskiptracing, h.declareddate, h.declaredvalue, h.scenario, h.dr, h.phoneid, h.addressid, h.dictid, h.hasfields, h.hasevents, h.moodindicatorid
  • Index Cond: (((h.created)::date >= '2020-03-01'::date) AND ((h.created)::date < ('now'::cstring)::date))
  • Buffers: shared hit=7642
17. 0.022 389.959 ↑ 3.5 20 1

Sort (cost=25,148.31..25,148.48 rows=69 width=10) (actual time=389.956..389.959 rows=20 loops=1)

  • Output: connect.connect, connect.aid
  • Sort Key: connect.aid
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=7670
18. 0.004 389.937 ↑ 3.5 20 1

Subquery Scan on connect (cost=25,144.82..25,146.20 rows=69 width=10) (actual time=389.931..389.937 rows=20 loops=1)

  • Output: connect.connect, connect.aid
  • Buffers: shared hit=7670
19. 73.548 389.933 ↑ 3.5 20 1

HashAggregate (cost=25,144.82..25,145.51 rows=69 width=10) (actual time=389.930..389.933 rows=20 loops=1)

  • Output: h_1.aid, count(h_1.typeid)
  • Group Key: h_1.aid
  • Buffers: shared hit=7670
20. 165.038 316.385 ↑ 1.1 398,368 1

Hash Join (cost=78.92..22,954.03 rows=438,158 width=7) (actual time=0.771..316.385 rows=398,368 loops=1)

  • Output: h_1.aid, h_1.typeid
  • Hash Cond: (h_1.typeid = cr.id)
  • Buffers: shared hit=7670
21. 150.620 150.620 ↑ 1.0 431,655 1

Index Scan using collecting_history_created_idx on delta.collecting_history h_1 (cost=0.44..16,817.50 rows=447,318 width=7) (actual time=0.031..150.620 rows=431,655 loops=1)

  • Output: h_1.id, h_1.lid, h_1.cid, h_1.aid, h_1.typeid, h_1.text, h_1.created, h_1.notification, h_1.paymentdate, h_1.paymentvalue, h_1.ispayment, h_1.isnotify, h_1.isviewved, h_1.isdeclared, h_1.isskiptracing, h_1.declareddate, h_1.declaredvalue, h_1.scenario, h_1.dr, h_1.phoneid, h_1.addressid, h_1.dictid, h_1.hasfields, h_1.hasevents, h_1.moodindicatorid
  • Index Cond: (((h_1.created)::date >= '2020-03-01'::date) AND ((h_1.created)::date < ('now'::cstring)::date))
  • Buffers: shared hit=7642
22. 0.184 0.727 ↑ 1.0 1,175 1

Hash (cost=63.69..63.69 rows=1,183 width=5) (actual time=0.727..0.727 rows=1,175 loops=1)

  • Output: cr.id
  • Buckets: 2048 Batches: 1 Memory Usage: 59kB
  • Buffers: shared hit=28
23. 0.279 0.543 ↑ 1.0 1,175 1

Hash Join (cost=14.25..63.69 rows=1,183 width=5) (actual time=0.138..0.543 rows=1,175 loops=1)

  • Output: cr.id
  • Hash Cond: (cr.typeid = ct.id)
  • Buffers: shared hit=28
24. 0.146 0.146 ↑ 1.0 1,208 1

Seq Scan on delta.collecting_contactresult cr (cost=0.00..33.08 rows=1,208 width=7) (actual time=0.012..0.146 rows=1,208 loops=1)

  • Output: cr.id, cr.typeid, cr.caption, cr.dataselect, cr.isnextcontact, cr.ispositive, cr.isdefault, cr.ishidden, cr.code, cr.fs, cr.dlfs, cr.showpromiss, cr.showdeclared, cr.showdelayreason, cr.showskip, cr.isscenarioauto, cr.ispaymentrequired, cr.isdeclaredrequired, cr.iscontwithrequired, cr.scriptcount, cr.scriptstate, cr.nextcontactmin, cr.nextcontactmax, cr.nextpromissmin, cr.nextpromissmax, cr.nextpaymentmin, cr.nextpaymentmax, cr.promisspaymentdays, cr.fields, cr.isconnect, cr.ismotivation, cr.showmoodindicator, cr.isphoneweight, cr.ispromiseschedule, cr.iscommentrequired, cr.fieldsrequired, cr.fieldsview
  • Buffers: shared hit=21
25. 0.030 0.118 ↑ 1.0 287 1

Hash (cost=10.66..10.66 rows=287 width=2) (actual time=0.118..0.118 rows=287 loops=1)

  • Output: ct.id
  • Buckets: 1024 Batches: 1 Memory Usage: 18kB
  • Buffers: shared hit=7
26. 0.088 0.088 ↑ 1.0 287 1

Seq Scan on delta.collecting_contacttype ct (cost=0.00..10.66 rows=287 width=2) (actual time=0.013..0.088 rows=287 loops=1)

  • Output: ct.id
  • Filter: (ct.caption !~~ 'Негативный контакт'::text)
  • Rows Removed by Filter: 6
  • Buffers: shared hit=7
27. 0.020 160.810 ↑ 5.3 13 1

Sort (cost=19,767.81..19,767.98 rows=69 width=10) (actual time=160.808..160.810 rows=13 loops=1)

  • Output: rpc.rpc, rpc.aid
  • Sort Key: rpc.aid
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=7670
28. 0.003 160.790 ↑ 5.3 13 1

Subquery Scan on rpc (cost=19,764.33..19,765.71 rows=69 width=10) (actual time=160.785..160.790 rows=13 loops=1)

  • Output: rpc.rpc, rpc.aid
  • Buffers: shared hit=7670
29. 0.797 160.787 ↑ 5.3 13 1

HashAggregate (cost=19,764.33..19,765.02 rows=69 width=10) (actual time=160.784..160.787 rows=13 loops=1)

  • Output: h_2.aid, count(h_2.typeid)
  • Group Key: h_2.aid
  • Buffers: shared hit=7670
30. 66.337 159.990 ↑ 18.4 4,389 1

Hash Join (cost=54.30..19,359.76 rows=80,914 width=7) (actual time=0.609..159.990 rows=4,389 loops=1)

  • Output: h_2.aid, h_2.typeid
  • Hash Cond: (h_2.typeid = cr_1.id)
  • Buffers: shared hit=7670
31. 93.095 93.095 ↑ 1.0 431,655 1

Index Scan using collecting_history_created_idx on delta.collecting_history h_2 (cost=0.44..16,817.50 rows=447,318 width=7) (actual time=0.030..93.095 rows=431,655 loops=1)

  • Output: h_2.id, h_2.lid, h_2.cid, h_2.aid, h_2.typeid, h_2.text, h_2.created, h_2.notification, h_2.paymentdate, h_2.paymentvalue, h_2.ispayment, h_2.isnotify, h_2.isviewved, h_2.isdeclared, h_2.isskiptracing, h_2.declareddate, h_2.declaredvalue, h_2.scenario, h_2.dr, h_2.phoneid, h_2.addressid, h_2.dictid, h_2.hasfields, h_2.hasevents, h_2.moodindicatorid
  • Index Cond: (((h_2.created)::date >= '2020-03-01'::date) AND ((h_2.created)::date < ('now'::cstring)::date))
  • Buffers: shared hit=7642
32. 0.045 0.558 ↓ 1.3 275 1

Hash (cost=51.12..51.12 rows=219 width=5) (actual time=0.558..0.558 rows=275 loops=1)

  • Output: cr_1.id
  • Buckets: 1024 Batches: 1 Memory Usage: 18kB
  • Buffers: shared hit=28
33. 0.139 0.513 ↓ 1.3 275 1

Hash Join (cost=11.32..51.12 rows=219 width=5) (actual time=0.247..0.513 rows=275 loops=1)

  • Output: cr_1.id
  • Hash Cond: (cr_1.typeid = ct_1.id)
  • Buffers: shared hit=28
34. 0.163 0.163 ↑ 1.0 1,208 1

Seq Scan on delta.collecting_contactresult cr_1 (cost=0.00..33.08 rows=1,208 width=7) (actual time=0.014..0.163 rows=1,208 loops=1)

  • Output: cr_1.id, cr_1.typeid, cr_1.caption, cr_1.dataselect, cr_1.isnextcontact, cr_1.ispositive, cr_1.isdefault, cr_1.ishidden, cr_1.code, cr_1.fs, cr_1.dlfs, cr_1.showpromiss, cr_1.showdeclared, cr_1.showdelayreason, cr_1.showskip, cr_1.isscenarioauto, cr_1.ispaymentrequired, cr_1.isdeclaredrequired, cr_1.iscontwithrequired, cr_1.scriptcount, cr_1.scriptstate, cr_1.nextcontactmin, cr_1.nextcontactmax, cr_1.nextpromissmin, cr_1.nextpromissmax, cr_1.nextpaymentmin, cr_1.nextpaymentmax, cr_1.promisspaymentdays, cr_1.fields, cr_1.isconnect, cr_1.ismotivation, cr_1.showmoodindicator, cr_1.isphoneweight, cr_1.ispromiseschedule, cr_1.iscommentrequired, cr_1.fieldsrequired, cr_1.fieldsview
  • Buffers: shared hit=21
35. 0.011 0.211 ↓ 1.0 54 1

Hash (cost=10.66..10.66 rows=53 width=2) (actual time=0.211..0.211 rows=54 loops=1)

  • Output: ct_1.id
  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared hit=7
36. 0.200 0.200 ↓ 1.0 54 1

Seq Scan on delta.collecting_contacttype ct_1 (cost=0.00..10.66 rows=53 width=2) (actual time=0.024..0.200 rows=54 loops=1)

  • Output: ct_1.id
  • Filter: (ct_1.captionpath ~~ '%клиент%'::text)
  • Rows Removed by Filter: 239
  • Buffers: shared hit=7
37. 0.021 179.659 ↑ 5.3 13 1

Sort (cost=18,821.00..18,821.18 rows=69 width=10) (actual time=179.656..179.659 rows=13 loops=1)

  • Output: opc.opc, opc.aid
  • Sort Key: opc.aid
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=7670
38. 0.002 179.638 ↑ 5.3 13 1

Subquery Scan on opc (cost=18,817.52..18,818.90 rows=69 width=10) (actual time=179.633..179.638 rows=13 loops=1)

  • Output: opc.opc, opc.aid
  • Buffers: shared hit=7670
39. 0.716 179.636 ↑ 5.3 13 1

HashAggregate (cost=18,817.52..18,818.21 rows=69 width=10) (actual time=179.633..179.636 rows=13 loops=1)

  • Output: h_3.aid, count(h_3.typeid)
  • Group Key: h_3.aid
  • Buffers: shared hit=7670
40. 67.594 178.920 ↑ 6.5 2,831 1

Hash Join (cost=49.96..18,725.92 rows=18,320 width=7) (actual time=0.565..178.920 rows=2,831 loops=1)

  • Output: h_3.aid, h_3.typeid
  • Hash Cond: (h_3.typeid = cr_2.id)
  • Buffers: shared hit=7670
41. 110.930 110.930 ↑ 1.0 431,655 1

Index Scan using collecting_history_created_idx on delta.collecting_history h_3 (cost=0.44..16,817.50 rows=447,318 width=7) (actual time=0.034..110.930 rows=431,655 loops=1)

  • Output: h_3.id, h_3.lid, h_3.cid, h_3.aid, h_3.typeid, h_3.text, h_3.created, h_3.notification, h_3.paymentdate, h_3.paymentvalue, h_3.ispayment, h_3.isnotify, h_3.isviewved, h_3.isdeclared, h_3.isskiptracing, h_3.declareddate, h_3.declaredvalue, h_3.scenario, h_3.dr, h_3.phoneid, h_3.addressid, h_3.dictid, h_3.hasfields, h_3.hasevents, h_3.moodindicatorid
  • Index Cond: (((h_3.created)::date >= '2020-03-01'::date) AND ((h_3.created)::date < ('now'::cstring)::date))
  • Buffers: shared hit=7642
42. 0.010 0.396 ↑ 1.1 44 1

Hash (cost=48.91..48.91 rows=49 width=5) (actual time=0.396..0.396 rows=44 loops=1)

  • Output: cr_2.id
  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared hit=28
43. 0.118 0.386 ↑ 1.1 44 1

Hash Join (cost=10.81..48.91 rows=49 width=5) (actual time=0.148..0.386 rows=44 loops=1)

  • Output: cr_2.id
  • Hash Cond: (cr_2.typeid = ct_2.id)
  • Buffers: shared hit=28
44. 0.156 0.156 ↑ 1.0 1,208 1

Seq Scan on delta.collecting_contactresult cr_2 (cost=0.00..33.08 rows=1,208 width=7) (actual time=0.012..0.156 rows=1,208 loops=1)

  • Output: cr_2.id, cr_2.typeid, cr_2.caption, cr_2.dataselect, cr_2.isnextcontact, cr_2.ispositive, cr_2.isdefault, cr_2.ishidden, cr_2.code, cr_2.fs, cr_2.dlfs, cr_2.showpromiss, cr_2.showdeclared, cr_2.showdelayreason, cr_2.showskip, cr_2.isscenarioauto, cr_2.ispaymentrequired, cr_2.isdeclaredrequired, cr_2.iscontwithrequired, cr_2.scriptcount, cr_2.scriptstate, cr_2.nextcontactmin, cr_2.nextcontactmax, cr_2.nextpromissmin, cr_2.nextpromissmax, cr_2.nextpaymentmin, cr_2.nextpaymentmax, cr_2.promisspaymentdays, cr_2.fields, cr_2.isconnect, cr_2.ismotivation, cr_2.showmoodindicator, cr_2.isphoneweight, cr_2.ispromiseschedule, cr_2.iscommentrequired, cr_2.fieldsrequired, cr_2.fieldsview
  • Buffers: shared hit=21
45. 0.005 0.112 ↑ 1.0 12 1

Hash (cost=10.66..10.66 rows=12 width=2) (actual time=0.112..0.112 rows=12 loops=1)

  • Output: ct_2.id
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=7
46. 0.107 0.107 ↑ 1.0 12 1

Seq Scan on delta.collecting_contacttype ct_2 (cost=0.00..10.66 rows=12 width=2) (actual time=0.021..0.107 rows=12 loops=1)

  • Output: ct_2.id
  • Filter: (ct_2.captionpath ~~ '%3-е лицо, знающее должника%'::text)
  • Rows Removed by Filter: 281
  • Buffers: shared hit=7
47. 0.018 149.690 ↑ 5.3 13 1

Sort (cost=18,636.90..18,637.07 rows=69 width=10) (actual time=149.687..149.690 rows=13 loops=1)

  • Output: tpc.tpc, tpc.aid
  • Sort Key: tpc.aid
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=7670
48. 0.004 149.672 ↑ 5.3 13 1

Subquery Scan on tpc (cost=18,633.41..18,634.79 rows=69 width=10) (actual time=149.667..149.672 rows=13 loops=1)

  • Output: tpc.tpc, tpc.aid
  • Buffers: shared hit=7670
49. 0.369 149.668 ↑ 5.3 13 1

HashAggregate (cost=18,633.41..18,634.10 rows=69 width=10) (actual time=149.666..149.668 rows=13 loops=1)

  • Output: h_4.aid, count(h_4.typeid)
  • Group Key: h_4.aid
  • Buffers: shared hit=7670
50. 57.937 149.299 ↑ 3.0 2,030 1

Hash Join (cost=49.12..18,602.88 rows=6,107 width=7) (actual time=0.565..149.299 rows=2,030 loops=1)

  • Output: h_4.aid, h_4.typeid
  • Hash Cond: (h_4.typeid = cr_3.id)
  • Buffers: shared hit=7670
51. 90.955 90.955 ↑ 1.0 431,655 1

Index Scan using collecting_history_created_idx on delta.collecting_history h_4 (cost=0.44..16,817.50 rows=447,318 width=7) (actual time=0.028..90.955 rows=431,655 loops=1)

  • Output: h_4.id, h_4.lid, h_4.cid, h_4.aid, h_4.typeid, h_4.text, h_4.created, h_4.notification, h_4.paymentdate, h_4.paymentvalue, h_4.ispayment, h_4.isnotify, h_4.isviewved, h_4.isdeclared, h_4.isskiptracing, h_4.declareddate, h_4.declaredvalue, h_4.scenario, h_4.dr, h_4.phoneid, h_4.addressid, h_4.dictid, h_4.hasfields, h_4.hasevents, h_4.moodindicatorid
  • Index Cond: (((h_4.created)::date >= '2020-03-01'::date) AND ((h_4.created)::date < ('now'::cstring)::date))
  • Buffers: shared hit=7642
52. 0.003 0.407 ↑ 2.0 8 1

Hash (cost=48.48..48.48 rows=16 width=5) (actual time=0.407..0.407 rows=8 loops=1)

  • Output: cr_3.id
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=28
53. 0.133 0.404 ↑ 2.0 8 1

Hash Join (cost=10.71..48.48 rows=16 width=5) (actual time=0.153..0.404 rows=8 loops=1)

  • Output: cr_3.id
  • Hash Cond: (cr_3.typeid = ct_3.id)
  • Buffers: shared hit=28
54. 0.160 0.160 ↑ 1.0 1,208 1

Seq Scan on delta.collecting_contactresult cr_3 (cost=0.00..33.08 rows=1,208 width=7) (actual time=0.010..0.160 rows=1,208 loops=1)

  • Output: cr_3.id, cr_3.typeid, cr_3.caption, cr_3.dataselect, cr_3.isnextcontact, cr_3.ispositive, cr_3.isdefault, cr_3.ishidden, cr_3.code, cr_3.fs, cr_3.dlfs, cr_3.showpromiss, cr_3.showdeclared, cr_3.showdelayreason, cr_3.showskip, cr_3.isscenarioauto, cr_3.ispaymentrequired, cr_3.isdeclaredrequired, cr_3.iscontwithrequired, cr_3.scriptcount, cr_3.scriptstate, cr_3.nextcontactmin, cr_3.nextcontactmax, cr_3.nextpromissmin, cr_3.nextpromissmax, cr_3.nextpaymentmin, cr_3.nextpaymentmax, cr_3.promisspaymentdays, cr_3.fields, cr_3.isconnect, cr_3.ismotivation, cr_3.showmoodindicator, cr_3.isphoneweight, cr_3.ispromiseschedule, cr_3.iscommentrequired, cr_3.fieldsrequired, cr_3.fieldsview
  • Buffers: shared hit=21
55. 0.002 0.111 ↑ 1.0 4 1

Hash (cost=10.66..10.66 rows=4 width=2) (actual time=0.111..0.111 rows=4 loops=1)

  • Output: ct_3.id
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=7
56. 0.109 0.109 ↑ 1.0 4 1

Seq Scan on delta.collecting_contacttype ct_3 (cost=0.00..10.66 rows=4 width=2) (actual time=0.020..0.109 rows=4 loops=1)

  • Output: ct_3.id
  • Filter: (ct_3.captionpath ~~ '%3-е лицо, не знающее%'::text)
  • Rows Removed by Filter: 289
  • Buffers: shared hit=7
57. 0.017 316.459 ↑ 3.5 20 1

Sort (cost=23,655.09..23,655.26 rows=69 width=10) (actual time=316.456..316.459 rows=20 loops=1)

  • Output: oth.oth, oth.aid
  • Sort Key: oth.aid
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=7670
58. 0.004 316.442 ↑ 3.5 20 1

Subquery Scan on oth (cost=23,651.61..23,652.99 rows=69 width=10) (actual time=316.436..316.442 rows=20 loops=1)

  • Output: oth.oth, oth.aid
  • Buffers: shared hit=7670
59. 65.902 316.438 ↑ 3.5 20 1

HashAggregate (cost=23,651.61..23,652.30 rows=69 width=10) (actual time=316.434..316.438 rows=20 loops=1)

  • Output: h_5.aid, count(h_5.typeid)
  • Group Key: h_5.aid
  • Buffers: shared hit=7670
60. 143.694 250.536 ↓ 1.1 389,118 1

Hash Join (cost=74.27..21,956.99 rows=338,924 width=7) (actual time=0.849..250.536 rows=389,118 loops=1)

  • Output: h_5.aid, h_5.typeid
  • Hash Cond: (h_5.typeid = cr_4.id)
  • Buffers: shared hit=7670
61. 106.044 106.044 ↑ 1.0 431,655 1

Index Scan using collecting_history_created_idx on delta.collecting_history h_5 (cost=0.44..16,817.50 rows=447,318 width=7) (actual time=0.038..106.044 rows=431,655 loops=1)

  • Output: h_5.id, h_5.lid, h_5.cid, h_5.aid, h_5.typeid, h_5.text, h_5.created, h_5.notification, h_5.paymentdate, h_5.paymentvalue, h_5.ispayment, h_5.isnotify, h_5.isviewved, h_5.isdeclared, h_5.isskiptracing, h_5.declareddate, h_5.declaredvalue, h_5.scenario, h_5.dr, h_5.phoneid, h_5.addressid, h_5.dictid, h_5.hasfields, h_5.hasevents, h_5.moodindicatorid
  • Index Cond: (((h_5.created)::date >= '2020-03-01'::date) AND ((h_5.created)::date < ('now'::cstring)::date))
  • Buffers: shared hit=7642
62. 0.132 0.798 ↑ 1.1 848 1

Hash (cost=62.39..62.39 rows=915 width=5) (actual time=0.798..0.798 rows=848 loops=1)

  • Output: cr_4.id
  • Buckets: 1024 Batches: 1 Memory Usage: 39kB
  • Buffers: shared hit=28
63. 0.229 0.666 ↑ 1.1 848 1

Hash Join (cost=15.63..62.39 rows=915 width=5) (actual time=0.311..0.666 rows=848 loops=1)

  • Output: cr_4.id
  • Hash Cond: (cr_4.typeid = ct_4.id)
  • Buffers: shared hit=28
64. 0.146 0.146 ↑ 1.0 1,208 1

Seq Scan on delta.collecting_contactresult cr_4 (cost=0.00..33.08 rows=1,208 width=7) (actual time=0.010..0.146 rows=1,208 loops=1)

  • Output: cr_4.id, cr_4.typeid, cr_4.caption, cr_4.dataselect, cr_4.isnextcontact, cr_4.ispositive, cr_4.isdefault, cr_4.ishidden, cr_4.code, cr_4.fs, cr_4.dlfs, cr_4.showpromiss, cr_4.showdeclared, cr_4.showdelayreason, cr_4.showskip, cr_4.isscenarioauto, cr_4.ispaymentrequired, cr_4.isdeclaredrequired, cr_4.iscontwithrequired, cr_4.scriptcount, cr_4.scriptstate, cr_4.nextcontactmin, cr_4.nextcontactmax, cr_4.nextpromissmin, cr_4.nextpromissmax, cr_4.nextpaymentmin, cr_4.nextpaymentmax, cr_4.promisspaymentdays, cr_4.fields, cr_4.isconnect, cr_4.ismotivation, cr_4.showmoodindicator, cr_4.isphoneweight, cr_4.ispromiseschedule, cr_4.iscommentrequired, cr_4.fieldsrequired, cr_4.fieldsview
  • Buffers: shared hit=21
65. 0.024 0.291 ↑ 1.0 217 1

Hash (cost=12.86..12.86 rows=222 width=2) (actual time=0.291..0.291 rows=217 loops=1)

  • Output: ct_4.id
  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
  • Buffers: shared hit=7
66. 0.267 0.267 ↑ 1.0 217 1

Seq Scan on delta.collecting_contacttype ct_4 (cost=0.00..12.86 rows=222 width=2) (actual time=0.015..0.267 rows=217 loops=1)

  • Output: ct_4.id
  • Filter: ((ct_4.captionpath !~~ '%3-е лицо, не знающее%'::text) AND (ct_4.captionpath !~~ '%3-е лицо, знающее должника%'::text) AND (ct_4.captionpath !~~ '%клиент%'::text) AND (ct_4.caption !~~ 'Негативный контакт'::text))
  • Rows Removed by Filter: 76
  • Buffers: shared hit=7
67. 0.011 0.592 ↑ 5.4 12 1

Sort (cost=65.74..65.90 rows=65 width=20) (actual time=0.592..0.592 rows=12 loops=1)

  • Output: prom.promsum, prom.promcount, prom.aid
  • Sort Key: prom.aid
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=27
68. 0.002 0.581 ↑ 5.4 12 1

Subquery Scan on prom (cost=62.48..63.78 rows=65 width=20) (actual time=0.578..0.581 rows=12 loops=1)

  • Output: prom.promsum, prom.promcount, prom.aid
  • Buffers: shared hit=27
69. 0.285 0.579 ↑ 5.4 12 1

HashAggregate (cost=62.48..63.13 rows=65 width=20) (actual time=0.577..0.579 rows=12 loops=1)

  • Output: pp.aid, sum(pp.totalamountpromise), count(pp.id)
  • Group Key: pp.aid
  • Buffers: shared hit=27
70. 0.294 0.294 ↑ 1.1 1,269 1

Index Scan using collecting_promisepayment_created_idx on delta.collecting_promisepayment pp (cost=0.29..52.48 rows=1,334 width=16) (actual time=0.021..0.294 rows=1,269 loops=1)

  • Output: pp.id, pp.aid, pp.pid, pp.loanid, pp.isdiscount, pp.firsttimepromise, pp.totalamountpromise, pp.periodamount, pp.paymentperiod, pp.state, pp.comment, pp.phoneid, pp.created, pp.discountamount, pp.promisesource, pp.isimport, pp.delayreason
  • Index Cond: (((pp.created)::date >= '2020-03-01'::date) AND ((pp.created)::date < ('now'::cstring)::date))
  • Buffers: shared hit=27
71. 0.004 0.020 ↓ 6.0 6 20

Materialize (cost=0.00..1.35 rows=1 width=37) (actual time=0.001..0.001 rows=6 loops=20)

  • Output: collection_oper_individual_plan.plan_promise, collection_oper_individual_plan.name
  • Buffers: shared hit=1
72. 0.016 0.016 ↓ 6.0 6 1

Seq Scan on analysts.collection_oper_individual_plan (cost=0.00..1.35 rows=1 width=37) (actual time=0.013..0.016 rows=6 loops=1)

  • Output: collection_oper_individual_plan.plan_promise, collection_oper_individual_plan.name
  • Filter: ((collection_oper_individual_plan.month >= '2020-03-01'::date) AND (collection_oper_individual_plan.month <= '2020-03-21'::date) AND (collection_oper_individual_plan.bucket = '6-20'::text))
  • Rows Removed by Filter: 25
  • Buffers: shared hit=1
73. 0.924 3,772.644 ↑ 8.1 12 6

GroupAggregate (cost=149,258.61..149,269.59 rows=97 width=38) (actual time=628.568..628.774 rows=12 loops=6)

  • Output: u_1.name, sum(pp_1.totalamountpromise)
  • Group Key: u_1.name
  • Buffers: shared hit=268222, temp read=4605 written=4605
74. 0.832 3,771.720 ↑ 1.0 1,313 6

Sort (cost=149,258.61..149,261.95 rows=1,334 width=38) (actual time=628.548..628.620 rows=1,313 loops=6)

  • Output: u_1.name, pp_1.totalamountpromise
  • Sort Key: u_1.name
  • Sort Method: quicksort Memory: 159kB
  • Buffers: shared hit=268222, temp read=4605 written=4605
75. 1.068 3,770.888 ↑ 1.0 1,313 1

Hash Left Join (cost=149,134.14..149,189.37 rows=1,334 width=38) (actual time=3,769.603..3,770.888 rows=1,313 loops=1)

  • Output: u_1.name, pp_1.totalamountpromise
  • Hash Cond: (pp_1.loanid = l.id)
  • Buffers: shared hit=268222, temp read=4605 written=4605
76. 0.278 3,672.203 ↑ 1.0 1,313 1

Hash Left Join (cost=136,393.42..136,430.31 rows=1,334 width=45) (actual time=3,671.635..3,672.203 rows=1,313 loops=1)

  • Output: pp_1.totalamountpromise, pp_1.loanid, u_1.name
  • Hash Cond: (pp_1.aid = u_1.id)
  • Buffers: shared hit=259508, temp read=4605 written=4605
77. 0.227 3,671.880 ↑ 1.0 1,313 1

Hash Right Join (cost=136,388.24..136,406.79 rows=1,334 width=19) (actual time=3,671.571..3,671.880 rows=1,313 loops=1)

  • Output: pp_1.totalamountpromise, pp_1.aid, pp_1.loanid
  • Hash Cond: (a.id = pp_1.id)
  • Buffers: shared hit=259505, temp read=4605 written=4605
78. 0.065 3,671.200 ↓ 1.2 243 1

GroupAggregate (cost=136,319.09..136,334.84 rows=200 width=40) (actual time=3,671.102..3,671.200 rows=243 loops=1)

  • Output: a.id, a.aid, NULL::numeric
  • Group Key: a.id, a.aid
  • Buffers: shared hit=259477, temp read=4605 written=4605
79. 0.106 3,671.135 ↑ 6.2 297 1

Sort (cost=136,319.09..136,323.67 rows=1,833 width=8) (actual time=3,671.098..3,671.135 rows=297 loops=1)

  • Output: a.id, a.aid
  • Sort Key: a.id, a.aid
  • Sort Method: quicksort Memory: 38kB
  • Buffers: shared hit=259477, temp read=4605 written=4605
80. 0.037 3,671.029 ↑ 6.2 297 1

Subquery Scan on a (cost=136,178.50..136,219.74 rows=1,833 width=8) (actual time=3,670.930..3,671.029 rows=297 loops=1)

  • Output: a.id, a.aid
  • Buffers: shared hit=259477, temp read=4605 written=4605
81. 0.038 3,670.992 ↑ 6.2 297 1

Unique (cost=136,178.50..136,201.41 rows=1,833 width=28) (actual time=3,670.928..3,670.992 rows=297 loops=1)

  • Output: pp_2.id, acc.sum, acc.accounting_id, pp_2.aid
  • Buffers: shared hit=259477, temp read=4605 written=4605
82. 0.556 3,670.954 ↑ 6.2 297 1

Sort (cost=136,178.50..136,183.08 rows=1,833 width=28) (actual time=3,670.927..3,670.954 rows=297 loops=1)

  • Output: pp_2.id, acc.sum, acc.accounting_id, pp_2.aid
  • Sort Key: pp_2.id, acc.sum, acc.accounting_id, pp_2.aid
  • Sort Method: quicksort Memory: 48kB
  • Buffers: shared hit=259477, temp read=4605 written=4605
83. 23.725 3,670.398 ↑ 6.2 297 1

Merge Join (cost=112,095.95..136,079.15 rows=1,833 width=28) (actual time=517.832..3,670.398 rows=297 loops=1)

  • Output: pp_2.id, acc.sum, acc.accounting_id, pp_2.aid
  • Merge Cond: (acc.accounting_id = acc_1.accounting_id)
  • Buffers: shared hit=259477, temp read=4605 written=4605
84. 158.856 498.215 ↑ 1.0 366,465 1

Unique (cost=87,090.63..104,500.71 rows=366,528 width=416) (actual time=275.779..498.215 rows=366,465 loops=1)

  • Output: acc.accounting_id, acc.tms, acc.auser_id, acc.application_id, acc.type, acc.method, acc.sum, acc.balance_before, acc.balance_after, acc.bazis_before, acc.bazis_after, acc.percent_before, acc.percent_after, acc.penalty_before, acc.penalty_after, acc.fee_before, acc.fee_after, acc.app_overdue_days
  • Buffers: shared hit=5528, temp read=4605 written=4605
85. 258.099 339.359 ↑ 1.0 366,465 1

Sort (cost=87,090.63..88,006.95 rows=366,528 width=416) (actual time=275.778..339.359 rows=366,465 loops=1)

  • Output: acc.accounting_id, acc.tms, acc.auser_id, acc.application_id, acc.type, acc.method, acc.sum, acc.balance_before, acc.balance_after, acc.bazis_before, acc.bazis_after, acc.percent_before, acc.percent_after, acc.penalty_before, acc.penalty_after, acc.fee_before, acc.fee_after, acc.app_overdue_days
  • Sort Key: acc.accounting_id, acc.tms, acc.auser_id, acc.application_id, acc.type, acc.method, acc.sum, acc.balance_before, acc.balance_after, acc.bazis_before, acc.bazis_after, acc.percent_before, acc.percent_after, acc.penalty_before, acc.penalty_after, acc.fee_before, acc.fee_after, acc.app_overdue_days
  • Sort Method: external merge Disk: 36824kB
  • Buffers: shared hit=5528, temp read=4605 written=4605
86. 30.452 81.260 ↑ 1.0 366,528 1

Append (cost=0.00..12,858.56 rows=366,528 width=416) (actual time=0.009..81.260 rows=366,528 loops=1)

  • Buffers: shared hit=5528
87. 39.719 39.719 ↑ 1.0 307,952 1

Seq Scan on delta.collecting_accounting acc (cost=0.00..7,825.52 rows=307,952 width=84) (actual time=0.009..39.719 rows=307,952 loops=1)

  • Output: acc.accounting_id, acc.tms, acc.auser_id, acc.application_id, acc.type, acc.method, acc.sum, acc.balance_before, acc.balance_after, acc.bazis_before, acc.bazis_after, acc.percent_before, acc.percent_after, acc.penalty_before, acc.penalty_after, acc.fee_before, acc.fee_after, acc.app_overdue_days
  • Buffers: shared hit=4746
88. 11.089 11.089 ↑ 1.0 58,576 1

Seq Scan on delta.collecting_accounting3 acc3 (cost=0.00..1,367.76 rows=58,576 width=174) (actual time=0.011..11.089 rows=58,576 loops=1)

  • Output: acc3.accounting_id, acc3.tms, acc3.auser_id, acc3.application_id, acc3.type, acc3.method, acc3.sum, acc3.balance_before, acc3.balance_after, acc3.bazis_before, acc3.bazis_after, acc3.percent_before, acc3.percent_after, acc3.penalty_before, acc3.penalty_after, acc3.fee_before, acc3.fee_after, acc3.app_overdue_days
  • Buffers: shared hit=782
89. 0.918 3,148.458 ↓ 297.0 297 1

Materialize (cost=25,005.32..26,969.35 rows=1 width=12) (actual time=199.059..3,148.458 rows=297 loops=1)

  • Output: acc_1.accounting_id, pp_2.id, pp_2.aid
  • Buffers: shared hit=253949
90. 1,238.457 3,147.540 ↓ 297.0 297 1

Nested Loop (cost=25,005.32..26,969.35 rows=1 width=12) (actual time=199.055..3,147.540 rows=297 loops=1)

  • Output: acc_1.accounting_id, pp_2.id, pp_2.aid
  • Join Filter: ((max(pp_3.id)) = pp_2.id)
  • Rows Removed by Join Filter: 15272037
  • Buffers: shared hit=253949
91. 1.119 191.235 ↓ 297.0 297 1

GroupAggregate (cost=25,005.32..25,005.34 rows=1 width=20) (actual time=189.867..191.235 rows=297 loops=1)

  • Output: acc_1.accounting_id, max(pp_3.id), acc_1.application_id, acc_1.tms
  • Group Key: acc_1.accounting_id, acc_1.application_id, acc_1.tms
  • Buffers: shared hit=14270
92. 0.343 190.116 ↓ 299.0 299 1

Sort (cost=25,005.32..25,005.32 rows=1 width=20) (actual time=189.861..190.116 rows=299 loops=1)

  • Output: acc_1.accounting_id, acc_1.application_id, acc_1.tms, pp_3.id
  • Sort Key: acc_1.accounting_id, acc_1.application_id, acc_1.tms
  • Sort Method: quicksort Memory: 48kB
  • Buffers: shared hit=14270
93. 0.423 189.773 ↓ 299.0 299 1

Hash Join (cost=24,948.06..25,005.31 rows=1 width=20) (actual time=189.114..189.773 rows=299 loops=1)

  • Output: acc_1.accounting_id, acc_1.application_id, acc_1.tms, pp_3.id
  • Hash Cond: (pp_3.loanid = l_1.id)
  • Join Filter: ((acc_1.tms > pp_3.created) AND ((date(acc_1.tms) - date(pp_3.firsttimepromise)) < 2))
  • Rows Removed by Join Filter: 469
  • Buffers: shared hit=14270
94. 0.300 0.300 ↑ 1.0 1,313 1

Index Scan using collecting_promisepayment_created_idx on delta.collecting_promisepayment pp_3 (cost=0.29..52.48 rows=1,334 width=27) (actual time=0.032..0.300 rows=1,313 loops=1)

  • Output: pp_3.id, pp_3.aid, pp_3.pid, pp_3.loanid, pp_3.isdiscount, pp_3.firsttimepromise, pp_3.totalamountpromise, pp_3.periodamount, pp_3.paymentperiod, pp_3.state, pp_3.comment, pp_3.phoneid, pp_3.created, pp_3.discountamount, pp_3.promisesource, pp_3.isimport, pp_3.delayreason
  • Index Cond: (((pp_3.created)::date >= '2020-03-01'::date) AND ((pp_3.created)::date <= ('now'::cstring)::date))
  • Buffers: shared hit=28
95. 0.197 189.050 ↓ 3.0 1,030 1

Hash (cost=24,943.52..24,943.52 rows=339 width=22) (actual time=189.050..189.050 rows=1,030 loops=1)

  • Output: acc_1.accounting_id, acc_1.application_id, acc_1.tms, l_1.id
  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 72kB
  • Buffers: shared hit=14242
96. 1.183 188.853 ↓ 3.0 1,030 1

Hash Join (cost=24,922.34..24,943.52 rows=339 width=22) (actual time=187.723..188.853 rows=1,030 loops=1)

  • Output: acc_1.accounting_id, acc_1.application_id, acc_1.tms, l_1.id
  • Hash Cond: ((acc_1.application_id)::numeric = l_1.eid)
  • Buffers: shared hit=14242
97. 1.045 75.241 ↓ 3.0 1,030 1

HashAggregate (cost=12,181.62..12,185.01 rows=339 width=416) (actual time=74.936..75.241 rows=1,030 loops=1)

  • Output: acc_1.accounting_id, acc_1.tms, acc_1.auser_id, acc_1.application_id, acc_1.type, acc_1.method, acc_1.sum, acc_1.balance_before, acc_1.balance_after, acc_1.bazis_before, acc_1.bazis_after, acc_1.percent_before, acc_1.percent_after, acc_1.penalty_before, acc_1.penalty_after, acc_1.fee_before, acc_1.fee_after, acc_1.app_overdue_days
  • Group Key: acc_1.accounting_id, acc_1.tms, acc_1.auser_id, acc_1.application_id, acc_1.type, acc_1.method, acc_1.sum, acc_1.balance_before, acc_1.balance_after, acc_1.bazis_before, acc_1.bazis_after, acc_1.percent_before, acc_1.percent_after, acc_1.penalty_before, acc_1.penalty_after, acc_1.fee_before, acc_1.fee_after, acc_1.app_overdue_days
  • Buffers: shared hit=5528
98. 0.000 74.196 ↓ 3.0 1,030 1

Append (cost=1,000.00..12,166.37 rows=339 width=416) (actual time=61.961..74.196 rows=1,030 loops=1)

  • Buffers: shared hit=5528
99. 0.759 62.120 ↑ 47.2 6 1

Gather (cost=1,000.00..9,623.70 rows=283 width=84) (actual time=61.960..62.120 rows=6 loops=1)

  • Output: acc_1.accounting_id, acc_1.tms, acc_1.auser_id, acc_1.application_id, acc_1.type, acc_1.method, acc_1.sum, acc_1.balance_before, acc_1.balance_after, acc_1.bazis_before, acc_1.bazis_after, acc_1.percent_before, acc_1.percent_after, acc_1.penalty_before, acc_1.penalty_after, acc_1.fee_before, acc_1.fee_after, acc_1.app_overdue_days
  • Workers Planned: 2
  • Workers Launched: 0
  • Buffers: shared hit=4746
100. 61.361 61.361 ↑ 19.7 6 1

Parallel Seq Scan on delta.collecting_accounting acc_1 (cost=0.00..8,595.40 rows=118 width=84) (actual time=61.324..61.361 rows=6 loops=1)

  • Output: acc_1.accounting_id, acc_1.tms, acc_1.auser_id, acc_1.application_id, acc_1.type, acc_1.method, acc_1.sum, acc_1.balance_before, acc_1.balance_after, acc_1.bazis_before, acc_1.bazis_after, acc_1.percent_before, acc_1.percent_after, acc_1.penalty_before, acc_1.penalty_after, acc_1.fee_before, acc_1.fee_after, acc_1.app_overdue_days
  • Filter: ((acc_1.app_overdue_days > 2) AND (acc_1.app_overdue_days < 21) AND ((acc_1.tms)::date >= '2020-03-01'::date) AND ((acc_1.tms)::date <= ('now'::cstring)::date))
  • Rows Removed by Filter: 307946
  • Buffers: shared hit=4746
101. 12.101 12.101 ↓ 18.3 1,024 1

Seq Scan on delta.collecting_accounting3 acc3_1 (cost=0.00..2,539.28 rows=56 width=174) (actual time=4.387..12.101 rows=1,024 loops=1)

  • Output: acc3_1.accounting_id, acc3_1.tms, acc3_1.auser_id, acc3_1.application_id, acc3_1.type, acc3_1.method, acc3_1.sum, acc3_1.balance_before, acc3_1.balance_after, acc3_1.bazis_before, acc3_1.bazis_after, acc3_1.percent_before, acc3_1.percent_after, acc3_1.penalty_before, acc3_1.penalty_after, acc3_1.fee_before, acc3_1.fee_after, acc3_1.app_overdue_days
  • Filter: ((acc3_1.app_overdue_days > 2) AND (acc3_1.app_overdue_days < 21) AND ((acc3_1.tms)::date >= '2020-03-01'::date) AND ((acc3_1.tms)::date <= ('now'::cstring)::date))
  • Rows Removed by Filter: 57552
  • Buffers: shared hit=782
102. 53.318 112.429 ↑ 1.0 178,965 1

Hash (cost=10,503.65..10,503.65 rows=178,965 width=12) (actual time=112.429..112.429 rows=178,965 loops=1)

  • Output: l_1.id, l_1.eid
  • Buckets: 262144 Batches: 1 Memory Usage: 10087kB
  • Buffers: shared hit=8714
103. 59.111 59.111 ↑ 1.0 178,965 1

Seq Scan on delta.collecting_loans l_1 (cost=0.00..10,503.65 rows=178,965 width=12) (actual time=0.011..59.111 rows=178,965 loops=1)

  • Output: l_1.id, l_1.eid
  • Buffers: shared hit=8714
104. 1,717.848 1,717.848 ↑ 1.0 51,422 297

Seq Scan on delta.collecting_promisepayment pp_2 (cost=0.00..1,321.22 rows=51,422 width=8) (actual time=0.004..5.784 rows=51,422 loops=297)

  • Output: pp_2.id, pp_2.aid, pp_2.pid, pp_2.loanid, pp_2.isdiscount, pp_2.firsttimepromise, pp_2.totalamountpromise, pp_2.periodamount, pp_2.paymentperiod, pp_2.state, pp_2.comment, pp_2.phoneid, pp_2.created, pp_2.discountamount, pp_2.promisesource, pp_2.isimport, pp_2.delayreason
  • Buffers: shared hit=239679
105. 0.155 0.453 ↑ 1.0 1,313 1

Hash (cost=52.48..52.48 rows=1,334 width=23) (actual time=0.453..0.453 rows=1,313 loops=1)

  • Output: pp_1.totalamountpromise, pp_1.aid, pp_1.loanid, pp_1.id
  • Buckets: 2048 Batches: 1 Memory Usage: 88kB
  • Buffers: shared hit=28
106. 0.298 0.298 ↑ 1.0 1,313 1

Index Scan using collecting_promisepayment_created_idx on delta.collecting_promisepayment pp_1 (cost=0.29..52.48 rows=1,334 width=23) (actual time=0.006..0.298 rows=1,313 loops=1)

  • Output: pp_1.totalamountpromise, pp_1.aid, pp_1.loanid, pp_1.id
  • Index Cond: (((pp_1.created)::date >= '2020-03-01'::date) AND ((pp_1.created)::date <= ('now'::cstring)::date))
  • Buffers: shared hit=28
107. 0.015 0.045 ↑ 1.0 97 1

Hash (cost=3.97..3.97 rows=97 width=32) (actual time=0.045..0.045 rows=97 loops=1)

  • Output: u_1.name, u_1.id
  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
  • Buffers: shared hit=3
108. 0.030 0.030 ↑ 1.0 97 1

Seq Scan on delta.collecting_users u_1 (cost=0.00..3.97 rows=97 width=32) (actual time=0.011..0.030 rows=97 loops=1)

  • Output: u_1.name, u_1.id
  • Buffers: shared hit=3
109. 45.951 97.617 ↑ 1.0 178,965 1

Hash (cost=10,503.65..10,503.65 rows=178,965 width=6) (actual time=97.617..97.617 rows=178,965 loops=1)

  • Output: l.id
  • Buckets: 262144 Batches: 1 Memory Usage: 8865kB
  • Buffers: shared hit=8714
110. 51.666 51.666 ↑ 1.0 178,965 1

Seq Scan on delta.collecting_loans l (cost=0.00..10,503.65 rows=178,965 width=6) (actual time=0.009..51.666 rows=178,965 loops=1)

  • Output: l.id
  • Buffers: shared hit=8714