explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YuKV

Settings
# exclusive inclusive rows x rows loops node
1. 0.034 5,011.650 ↓ 6.0 6 1

Nested Loop Left Join (cost=280,448.44..280,456.81 rows=1 width=146) (actual time=5,010.304..5,011.650 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), (sum(pp.totalamountpromise)), (count(pp.id)), (((((count(pp.id)))::double precision / (rpc.rpc)::double precision)) * '100'::double precision), (sum(pp_1.totalamountpromise)), (((sum(pp_1.totalamountpromise)) / (sum(pp.totalamountpromise))) * '100'::double precision), ((collection_oper_individual_plan.plan_promise / 21) * (('now'::cstring)::date - '2020-03-01'::date)), ((sum(pp.totalamountpromise)) / (((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=316583, temp read=4605 written=4605
2. 0.030 1,246.226 ↓ 6.0 6 1

Nested Loop (cost=127,210.23..127,213.48 rows=1 width=122) (actual time=1,246.200..1,246.226 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)), (sum(pp.totalamountpromise)), (count(pp.id)), ((((count(pp.id)))::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=46803
3. 0.012 1,246.176 ↑ 3.5 20 1

Sort (cost=127,210.23..127,210.41 rows=69 width=118) (actual time=1,246.173..1,246.176 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)), (sum(pp.totalamountpromise)), (count(pp.id)), ((((count(pp.id)))::double precision / (rpc.rpc)::double precision))
  • Sort Key: act.act DESC
  • Sort Method: quicksort Memory: 29kB
  • Buffers: shared hit=46802
4. 0.039 1,246.164 ↑ 3.5 20 1

Hash Right Join (cost=127,201.55..127,208.13 rows=69 width=118) (actual time=1,246.130..1,246.164 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), (sum(pp.totalamountpromise)), (count(pp.id)), (((count(pp.id)))::double precision / (rpc.rpc)::double precision)
  • Hash Cond: (u.id = act.aid)
  • Buffers: shared hit=46802
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.009 1,246.105 ↑ 3.5 20 1

Hash (cost=127,200.69..127,200.69 rows=69 width=66) (actual time=1,246.105..1,246.105 rows=20 loops=1)

  • Output: act.act, act.aid, connect.connect, rpc.rpc, opc.opc, tpc.tpc, oth.oth, (sum(pp.totalamountpromise)), (count(pp.id))
  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared hit=46799
7. 0.015 1,246.096 ↑ 3.5 20 1

Merge Left Join (cost=127,189.53..127,200.69 rows=69 width=66) (actual time=1,245.812..1,246.096 rows=20 loops=1)

  • Output: act.act, act.aid, connect.connect, rpc.rpc, opc.opc, tpc.tpc, oth.oth, (sum(pp.totalamountpromise)), (count(pp.id))
  • Merge Cond: (act.aid = pp.aid)
  • Buffers: shared hit=46799
8. 0.014 1,235.046 ↑ 3.5 20 1

Merge Left Join (cost=125,086.69..125,092.90 rows=69 width=50) (actual time=1,234.994..1,235.046 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.009 950.824 ↑ 3.5 20 1

Merge Left Join (cost=101,431.60..101,436.60 rows=69 width=42) (actual time=950.784..950.824 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.010 796.533 ↑ 3.5 20 1

Merge Left Join (cost=82,794.70..82,798.50 rows=69 width=34) (actual time=796.499..796.533 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.014 649.267 ↑ 3.5 20 1

Merge Left Join (cost=63,973.70..63,976.28 rows=69 width=26) (actual time=649.239..649.267 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.015 484.297 ↑ 3.5 20 1

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

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

Sort (cost=19,057.58..19,057.75 rows=69 width=10) (actual time=178.811..178.818 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 178.797 ↑ 3.5 20 1

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

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

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

  • Output: h.aid, count(h.typeid)
  • Group Key: h.aid
  • Buffers: shared hit=7642
16. 96.481 96.481 ↑ 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.021..96.481 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 305.464 ↑ 3.5 20 1

Sort (cost=25,148.31..25,148.48 rows=69 width=10) (actual time=305.463..305.464 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 305.442 ↑ 3.5 20 1

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

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

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

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

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

  • Output: h_1.aid, h_1.typeid
  • Hash Cond: (h_1.typeid = cr.id)
  • Buffers: shared hit=7670
21. 93.594 93.594 ↑ 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.029..93.594 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.190 0.732 ↑ 1.0 1,175 1

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

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

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

  • Output: cr.id
  • Hash Cond: (cr.typeid = ct.id)
  • Buffers: shared hit=28
24. 0.150 0.150 ↑ 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.014..0.150 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.033 0.123 ↑ 1.0 287 1

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

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

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

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

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

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

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

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

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

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

Hash Join (cost=54.30..19,359.76 rows=80,914 width=7) (actual time=0.550..164.064 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. 102.749 102.749 ↑ 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.031..102.749 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.051 0.500 ↓ 1.3 275 1

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

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

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

  • Output: cr_1.id
  • Hash Cond: (cr_1.typeid = ct_1.id)
  • Buffers: shared hit=28
34. 0.142 0.142 ↑ 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.015..0.142 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.008 0.161 ↓ 1.0 54 1

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

  • Output: ct_1.id
  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared hit=7
36. 0.153 0.153 ↓ 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.153 rows=54 loops=1)

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

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

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

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

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

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

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

Hash Join (cost=49.96..18,725.92 rows=18,320 width=7) (actual time=0.577..146.692 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. 85.565 85.565 ↑ 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.027..85.565 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.005 0.399 ↑ 1.1 44 1

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

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

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

  • Output: cr_2.id
  • Hash Cond: (cr_2.typeid = ct_2.id)
  • Buffers: shared hit=28
44. 0.180 0.180 ↑ 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.013..0.180 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.002 0.104 ↑ 1.0 12 1

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

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

Seq Scan on delta.collecting_contacttype ct_2 (cost=0.00..10.66 rows=12 width=2) (actual time=0.020..0.102 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.017 154.282 ↑ 5.3 13 1

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

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

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

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

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

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

Hash Join (cost=49.12..18,602.88 rows=6,107 width=7) (actual time=5.539..153.830 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. 96.412 96.412 ↑ 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=5.063..96.412 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.005 0.352 ↑ 2.0 8 1

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

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

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

  • Output: cr_3.id
  • Hash Cond: (cr_3.typeid = ct_3.id)
  • Buffers: shared hit=28
54. 0.139 0.139 ↑ 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.015..0.139 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.003 0.105 ↑ 1.0 4 1

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

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

Seq Scan on delta.collecting_contacttype ct_3 (cost=0.00..10.66 rows=4 width=2) (actual time=0.019..0.102 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.024 284.208 ↑ 3.5 20 1

Sort (cost=23,655.09..23,655.26 rows=69 width=10) (actual time=284.203..284.208 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 284.184 ↑ 3.5 20 1

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

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

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

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

Hash Join (cost=74.27..21,956.99 rows=338,924 width=7) (actual time=0.789..229.323 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. 99.250 99.250 ↑ 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.031..99.250 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.105 0.747 ↑ 1.1 848 1

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

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

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

  • Output: cr_4.id
  • Hash Cond: (cr_4.typeid = ct_4.id)
  • Buffers: shared hit=28
64. 0.144 0.144 ↑ 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.013..0.144 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.027 0.281 ↑ 1.0 217 1

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

  • Output: ct_4.id
  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
  • Buffers: shared hit=7
66. 0.254 0.254 ↑ 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.254 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.003 11.035 ↑ 5.2 12 1

Materialize (cost=2,102.84..2,106.82 rows=63 width=20) (actual time=10.813..11.035 rows=12 loops=1)

  • Output: pp.aid, (sum(pp.totalamountpromise)), (count(pp.id))
  • Buffers: shared hit=807
68. 0.187 11.032 ↑ 5.2 12 1

GroupAggregate (cost=2,102.84..2,106.04 rows=63 width=20) (actual time=10.811..11.032 rows=12 loops=1)

  • Output: pp.aid, sum(pp.totalamountpromise), count(pp.id)
  • Group Key: pp.aid
  • Buffers: shared hit=807
69. 0.242 10.845 ↓ 4.9 1,269 1

Sort (cost=2,102.84..2,103.48 rows=257 width=16) (actual time=10.773..10.845 rows=1,269 loops=1)

  • Output: pp.aid, pp.totalamountpromise, pp.id
  • Sort Key: pp.aid
  • Sort Method: quicksort Memory: 148kB
  • Buffers: shared hit=807
70. 10.603 10.603 ↓ 4.9 1,269 1

Seq Scan on delta.collecting_promisepayment pp (cost=0.00..2,092.55 rows=257 width=16) (actual time=9.917..10.603 rows=1,269 loops=1)

  • Output: pp.aid, pp.totalamountpromise, pp.id
  • Filter: (((pp.created)::date >= '2020-03-01'::date) AND ((pp.created)::date < ('now'::cstring)::date))
  • Rows Removed by Filter: 50153
  • Buffers: shared hit=807
71. 0.003 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.017 0.017 ↓ 6.0 6 1

Seq Scan on analysts.collection_oper_individual_plan (cost=0.00..1.35 rows=1 width=37) (actual time=0.014..0.017 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.894 3,765.390 ↑ 8.1 12 6

GroupAggregate (cost=153,238.21..153,241.10 rows=97 width=38) (actual time=627.358..627.565 rows=12 loops=6)

  • Output: u_1.name, sum(pp_1.totalamountpromise)
  • Group Key: u_1.name
  • Buffers: shared hit=269780, temp read=4605 written=4605
74. 0.898 3,764.496 ↓ 5.1 1,313 6

Sort (cost=153,238.21..153,238.85 rows=257 width=38) (actual time=627.341..627.416 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=269780, temp read=4605 written=4605
75. 0.218 3,763.598 ↓ 5.1 1,313 1

Hash Left Join (cost=151,121.22..153,227.92 rows=257 width=38) (actual time=3,761.777..3,763.598 rows=1,313 loops=1)

  • Output: u_1.name, pp_1.totalamountpromise
  • Hash Cond: (pp_1.id = pay.id)
  • Buffers: shared hit=269780, temp read=4605 written=4605
76. 1.938 104.775 ↓ 5.1 1,313 1

Hash Left Join (cost=12,745.90..14,845.51 rows=257 width=42) (actual time=103.148..104.775 rows=1,313 loops=1)

  • Output: pp_1.totalamountpromise, pp_1.id, u_1.name
  • Hash Cond: (pp_1.loanid = l.id)
  • Buffers: shared hit=9524
77. 0.253 10.928 ↓ 5.1 1,313 1

Hash Left Join (cost=5.18..2,101.27 rows=257 width=48) (actual time=10.046..10.928 rows=1,313 loops=1)

  • Output: pp_1.totalamountpromise, pp_1.loanid, pp_1.id, u_1.name
  • Hash Cond: (pp_1.aid = u_1.id)
  • Buffers: shared hit=810
78. 10.632 10.632 ↓ 5.1 1,313 1

Seq Scan on delta.collecting_promisepayment pp_1 (cost=0.00..2,092.55 rows=257 width=22) (actual time=9.985..10.632 rows=1,313 loops=1)

  • Output: pp_1.id, pp_1.aid, pp_1.pid, pp_1.loanid, pp_1.isdiscount, pp_1.firsttimepromise, pp_1.totalamountpromise, pp_1.periodamount, pp_1.paymentperiod, pp_1.state, pp_1.comment, pp_1.phoneid, pp_1.created, pp_1.discountamount, pp_1.promisesource, pp_1.isimport, pp_1.delayreason
  • Filter: (((pp_1.created)::date >= '2020-03-01'::date) AND ((pp_1.created)::date <= ('now'::cstring)::date))
  • Rows Removed by Filter: 50109
  • Buffers: shared hit=807
79. 0.016 0.043 ↑ 1.0 97 1

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

  • Output: u_1.name, u_1.id
  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
  • Buffers: shared hit=3
80. 0.027 0.027 ↑ 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.027 rows=97 loops=1)

  • Output: u_1.name, u_1.id
  • Buffers: shared hit=3
81. 51.454 91.909 ↑ 1.0 178,965 1

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

  • Output: l.id
  • Buckets: 262144 Batches: 1 Memory Usage: 8865kB
  • Buffers: shared hit=8714
82. 40.455 40.455 ↑ 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.010..40.455 rows=178,965 loops=1)

  • Output: l.id
  • Buffers: shared hit=8714
83. 0.030 3,658.605 ↓ 1.2 243 1

Hash (cost=138,372.83..138,372.83 rows=200 width=4) (actual time=3,658.605..3,658.605 rows=243 loops=1)

  • Output: pay.id
  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
  • Buffers: shared hit=260256, temp read=4605 written=4605
84. 0.027 3,658.575 ↓ 1.2 243 1

Subquery Scan on pay (cost=138,355.08..138,372.83 rows=200 width=4) (actual time=3,658.482..3,658.575 rows=243 loops=1)

  • Output: pay.id
  • Buffers: shared hit=260256, temp read=4605 written=4605
85. 0.051 3,658.548 ↓ 1.2 243 1

GroupAggregate (cost=138,355.08..138,370.83 rows=200 width=40) (actual time=3,658.481..3,658.548 rows=243 loops=1)

  • Output: a.id, a.aid, NULL::numeric
  • Group Key: a.id, a.aid
  • Buffers: shared hit=260256, temp read=4605 written=4605
86. 0.086 3,658.497 ↑ 6.2 297 1

Sort (cost=138,355.08..138,359.66 rows=1,833 width=8) (actual time=3,658.477..3,658.497 rows=297 loops=1)

  • Output: a.id, a.aid
  • Sort Key: a.id, a.aid
  • Sort Method: quicksort Memory: 38kB
  • Buffers: shared hit=260256, temp read=4605 written=4605
87. 0.025 3,658.411 ↑ 6.2 297 1

Subquery Scan on a (cost=138,214.49..138,255.73 rows=1,833 width=8) (actual time=3,658.319..3,658.411 rows=297 loops=1)

  • Output: a.id, a.aid
  • Buffers: shared hit=260256, temp read=4605 written=4605
88. 0.048 3,658.386 ↑ 6.2 297 1

Unique (cost=138,214.49..138,237.40 rows=1,833 width=28) (actual time=3,658.318..3,658.386 rows=297 loops=1)

  • Output: pp_2.id, acc.sum, acc.accounting_id, pp_2.aid
  • Buffers: shared hit=260256, temp read=4605 written=4605
89. 0.524 3,658.338 ↑ 6.2 297 1

Sort (cost=138,214.49..138,219.07 rows=1,833 width=28) (actual time=3,658.317..3,658.338 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=260256, temp read=4605 written=4605
90. 25.226 3,657.814 ↑ 6.2 297 1

Merge Join (cost=114,131.94..138,115.14 rows=1,833 width=28) (actual time=487.875..3,657.814 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=260256, temp read=4605 written=4605
91. 160.398 479.036 ↑ 1.0 366,465 1

Unique (cost=87,090.63..104,500.71 rows=366,528 width=416) (actual time=266.565..479.036 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
92. 249.378 318.638 ↑ 1.0 366,465 1

Sort (cost=87,090.63..88,006.95 rows=366,528 width=416) (actual time=266.564..318.638 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
93. 25.940 69.260 ↑ 1.0 366,528 1

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

  • Buffers: shared hit=5528
94. 37.754 37.754 ↑ 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..37.754 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
95. 5.566 5.566 ↑ 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.012..5.566 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
96. 1.088 3,153.552 ↓ 297.0 297 1

Materialize (cost=27,041.31..29,005.34 rows=1 width=12) (actual time=176.316..3,153.552 rows=297 loops=1)

  • Output: acc_1.accounting_id, pp_2.id, pp_2.aid
  • Buffers: shared hit=254728
97. 1,263.102 3,152.464 ↓ 297.0 297 1

Nested Loop (cost=27,041.31..29,005.34 rows=1 width=12) (actual time=176.308..3,152.464 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=254728
98. 1.249 167.356 ↓ 297.0 297 1

GroupAggregate (cost=27,041.31..27,041.33 rows=1 width=20) (actual time=165.801..167.356 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=15049
99. 0.393 166.107 ↓ 299.0 299 1

Sort (cost=27,041.31..27,041.31 rows=1 width=20) (actual time=165.794..166.107 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=15049
100. 0.395 165.714 ↓ 299.0 299 1

Hash Join (cost=24,947.76..27,041.30 rows=1 width=20) (actual time=164.681..165.714 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=15049
101. 10.525 10.525 ↓ 5.1 1,313 1

Seq Scan on delta.collecting_promisepayment pp_3 (cost=0.00..2,092.55 rows=257 width=26) (actual time=9.851..10.525 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
  • Filter: (((pp_3.created)::date >= '2020-03-01'::date) AND ((pp_3.created)::date <= ('now'::cstring)::date))
  • Rows Removed by Filter: 50109
  • Buffers: shared hit=807
102. 0.183 154.794 ↓ 3.0 1,030 1

Hash (cost=24,943.52..24,943.52 rows=339 width=22) (actual time=154.794..154.794 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
103. 1.153 154.611 ↓ 3.0 1,030 1

Hash Join (cost=24,922.34..24,943.52 rows=339 width=22) (actual time=153.464..154.611 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
104. 1.089 54.320 ↓ 3.0 1,030 1

HashAggregate (cost=12,181.62..12,185.01 rows=339 width=416) (actual time=53.999..54.320 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
105. 0.022 53.231 ↓ 3.0 1,030 1

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

  • Buffers: shared hit=5528
106. 3.417 40.434 ↑ 47.2 6 1

Gather (cost=1,000.00..9,623.70 rows=283 width=84) (actual time=40.189..40.434 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: 1
  • Buffers: shared hit=4746
107. 37.017 37.017 ↑ 39.3 3 2 / 2

Parallel Seq Scan on delta.collecting_accounting acc_1 (cost=0.00..8,595.40 rows=118 width=84) (actual time=36.989..37.017 rows=3 loops=2)

  • 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: 153973
  • Buffers: shared hit=4746
  • Worker 0: actual time=34.496..34.540 rows=4 loops=1
  • Buffers: shared hit=1734
108. 12.775 12.775 ↓ 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.983..12.775 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
109. 43.696 99.138 ↑ 1.0 178,965 1

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

  • Output: l_1.id, l_1.eid
  • Buckets: 262144 Batches: 1 Memory Usage: 10087kB
  • Buffers: shared hit=8714
110. 55.442 55.442 ↑ 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.013..55.442 rows=178,965 loops=1)

  • Output: l_1.id, l_1.eid
  • Buffers: shared hit=8714
111. 1,722.006 1,722.006 ↑ 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.798 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