explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5PXm

Settings
# exclusive inclusive rows x rows loops node
1. 0.071 365,366.244 ↓ 1.5 22 1

Sort (cost=566,087,986.90..566,087,986.94 rows=15 width=358) (actual time=365,366.242..365,366.244 rows=22 loops=1)

  • Sort Key: pult.id, pult.caption
  • Sort Method: quicksort Memory: 30kB
2. 2.815 365,366.173 ↓ 1.5 22 1

HashAggregate (cost=211,534,471.67..566,087,986.46 rows=15 width=126) (actual time=364,671.794..365,366.173 rows=22 loops=1)

  • Filter: ((sum(stat.scope_2) > 0) OR (sum(stat.scope_3) > 0) OR (sum(stat.scope_4) > 0) OR (sum(stat.scope_5) > 0) OR (sum(stat.scope_6) > 0) OR (sum(stat.scope_other) > 0))
3.          

CTE stat

4. 1.670 364,563.544 ↑ 15.4 1,751 1

Unique (cost=211,525,596.58..211,526,742.42 rows=26,961 width=60) (actual time=364,561.703..364,563.544 rows=1,751 loops=1)

5. 3.081 364,561.874 ↑ 15.1 1,786 1

Sort (cost=211,525,596.58..211,525,663.98 rows=26,961 width=60) (actual time=364,561.702..364,561.874 rows=1,786 loops=1)

  • Sort Key: "*SELECT* 1".id_call, "*SELECT* 1".own_pult, "*SELECT* 1".send_time, "*SELECT* 1".status, (CASE WHEN ("*SELECT* 1".service_status IS NULL) THEN 10::numeric ELSE "*SELECT* 1".service_status END), "*SELECT* 1".id_scope, (CASE WHEN ("*SELECT* 1".id_scope = 1::numeric) THEN 1 ELSE 0 END), (CASE WHEN ("*SELECT* 1".id_scope = 2::numeric) THEN 1 ELSE 0 END), (CASE WHEN ("*SELECT* 1".id_scope = 3::numeric) THEN 1 ELSE 0 END), (CASE WHEN ("*SELECT* 1".id_scope = 4::numeric) THEN 1 ELSE 0 END), (CASE WHEN ("*SELECT* 1".id_scope = 5::numeric) THEN 1 ELSE 0 END), (CASE WHEN ("*SELECT* 1".id_scope = 6::numeric) THEN 1 ELSE 0 END), ((GREATEST("*SELECT* 1".reg_time, (SubPlan 26)) - (SubPlan 27))), (("*SELECT* 1".send_time - GREATEST("*SELECT* 1".reg_time, (SubPlan 29)))), (("*SELECT* 1".at_place_time - "*SELECT* 1".send_time)), "*SELECT* 1".victim_count
  • Sort Method: quicksort Memory: 368kB
6. 0.223 364,558.793 ↑ 15.1 1,786 1

Append (cost=105,728,463.68..211,522,597.44 rows=26,961 width=60) (actual time=180,671.208..364,558.793 rows=1,786 loops=1)

7. 0.466 180,671.721 ↑ 20.6 653 1

Unique (cost=105,728,463.68..105,734,185.71 rows=13,464 width=60) (actual time=180,671.207..180,671.721 rows=653 loops=1)

8. 2.482 180,671.255 ↑ 204.9 657 1

Sort (cost=105,728,463.68..105,728,800.27 rows=134,636 width=60) (actual time=180,671.206..180,671.255 rows=657 loops=1)

  • Sort Key: "*SELECT* 1".id_call, "*SELECT* 1".own_pult, "*SELECT* 1".send_time, "*SELECT* 1".status, (CASE WHEN ("*SELECT* 1".service_status IS NULL) THEN 10::numeric ELSE "*SELECT* 1".service_status END), "*SELECT* 1".id_scope, (CASE WHEN ("*SELECT* 1".id_scope = 1::numeric) THEN 1 ELSE 0 END), (CASE WHEN ("*SELECT* 1".id_scope = 2::numeric) THEN 1 ELSE 0 END), (CASE WHEN ("*SELECT* 1".id_scope = 3::numeric) THEN 1 ELSE 0 END), (CASE WHEN ("*SELECT* 1".id_scope = 4::numeric) THEN 1 ELSE 0 END), (CASE WHEN ("*SELECT* 1".id_scope = 5::numeric) THEN 1 ELSE 0 END), (CASE WHEN ("*SELECT* 1".id_scope = 6::numeric) THEN 1 ELSE 0 END), ((GREATEST("*SELECT* 1".reg_time, (SubPlan 26)) - (SubPlan 27))), (("*SELECT* 1".send_time - GREATEST("*SELECT* 1".reg_time, (SubPlan 29)))), (("*SELECT* 1".at_place_time - "*SELECT* 1".send_time)), "*SELECT* 1".victim_count
  • Sort Method: quicksort Memory: 151kB
9. 7.159 180,668.773 ↑ 204.9 657 1

Result (cost=107,963.11..105,711,929.07 rows=134,636 width=60) (actual time=1,616.073..180,668.773 rows=657 loops=1)

10. 0.307 180,549.924 ↑ 204.9 657 1

Append (cost=107,963.11..82,340,155.86 rows=134,636 width=60) (actual time=1,615.797..180,549.924 rows=657 loops=1)

11. 0.000 34,380.100 ↑ 231.7 560 1

Subquery Scan on *SELECT* 1 (cost=107,963.11..60,368,292.03 rows=129,758 width=60) (actual time=1,615.796..34,380.100 rows=560 loops=1)

  • Filter: (((("*SELECT* 1".own_pult IS NULL) OR ("*SELECT* 1".own_pult <> "*SELECT* 1".cascade_id)) AND ((SubPlan 31) >= '2019-06-04 07:40:18'::timestamp without time zone) AND ((SubPlan 33) <= '2019-06-05 07:40:18'::timestamp without time zone)) OR (((SubPlan 35) IS NULL) AND ("*SELECT* 1".reg_time >= '2019-06-04 07:40:18'::timestamp without time zone) AND ("*SELECT* 1".reg_time <= '2019-06-05 07:40:18'::timestamp without time zone)))
  • Rows Removed by Filter: 493030
12. 1,878.162 21,786.447 ↑ 2.4 493,590 1

Hash Left Join (cost=107,963.11..49,369,678.31 rows=1,170,633 width=48) (actual time=1,555.736..21,786.447 rows=493,590 loops=1)

  • Hash Cond: (ce.own_pult = op.cascade_id)
13. 557.216 4,918.343 ↑ 2.4 493,590 1

Hash Join (cost=107,948.45..216,403.31 rows=1,170,633 width=44) (actual time=1,555.445..4,918.343 rows=493,590 loops=1)

  • Hash Cond: (rpe.server_cid = p.id)
14. 2,431.445 4,360.966 ↓ 1.0 1,308,639 1

Hash Join (cost=107,933.54..199,796.57 rows=1,302,801 width=35) (actual time=1,555.275..4,360.966 rows=1,308,639 loops=1)

  • Hash Cond: (rpe.id_call = ce.id)
15. 375.453 375.453 ↓ 1.0 1,308,639 1

Seq Scan on ref_pult_event rpe (cost=0.00..41,976.01 rows=1,302,801 width=16) (actual time=0.008..375.453 rows=1,308,639 loops=1)

16. 660.292 1,554.068 ↑ 1.0 1,623,649 1

Hash (cost=76,517.35..76,517.35 rows=1,624,735 width=25) (actual time=1,554.068..1,554.068 rows=1,623,649 loops=1)

  • Buckets: 2048 Batches: 128 Memory Usage: 750kB
17. 893.776 893.776 ↑ 1.0 1,623,649 1

Seq Scan on call_event ce (cost=0.00..76,517.35 rows=1,624,735 width=25) (actual time=0.024..893.776 rows=1,623,649 loops=1)

18. 0.041 0.161 ↑ 1.4 135 1

Hash (cost=12.59..12.59 rows=186 width=14) (actual time=0.161..0.161 rows=135 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 7kB
19. 0.120 0.120 ↑ 1.4 135 1

Seq Scan on pult p (cost=0.00..12.59 rows=186 width=14) (actual time=0.009..0.120 rows=135 loops=1)

  • Filter: (id_scope <> 1::numeric)
  • Rows Removed by Filter: 72
20. 0.065 0.161 ↑ 1.0 207 1

Hash (cost=12.07..12.07 rows=207 width=9) (actual time=0.161..0.161 rows=207 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
21. 0.096 0.096 ↑ 1.0 207 1

Seq Scan on pult op (cost=0.00..12.07 rows=207 width=9) (actual time=0.005..0.096 rows=207 loops=1)

22.          

SubPlan (forHash Left Join)

23. 5,117.981 5,117.981 ↑ 1.0 1 465,271

Index Only Scan using ref_pult_event_status_idx on ref_pult_event rfpe_3 (cost=0.43..8.45 rows=1 width=5) (actual time=0.011..0.011 rows=1 loops=465,271)

  • Index Cond: ((id_call = rpe.id_call) AND (server_cid = op.id))
  • Heap Fetches: 197712
24. 493.590 6,416.670 ↑ 1.0 1 493,590

Aggregate (cost=16.75..16.76 rows=1 width=8) (actual time=0.013..0.013 rows=1 loops=493,590)

25. 832.932 5,923.080 ↑ 1.0 1 493,590

Nested Loop (cost=0.70..16.75 rows=1 width=8) (actual time=0.011..0.012 rows=1 loops=493,590)

26. 3,948.720 3,948.720 ↑ 1.0 1 493,590

Index Scan using call_tech_atplace_call_idx on call_tech ct_6 (cost=0.42..8.44 rows=1 width=13) (actual time=0.008..0.008 rows=1 loops=493,590)

  • Index Cond: (id_call = rpe.id_call)
27. 1,141.428 1,141.428 ↑ 1.0 1 380,476

Index Scan using technika_sys_c0042500 on technika t_4 (cost=0.28..8.30 rows=1 width=5) (actual time=0.003..0.003 rows=1 loops=380,476)

  • Index Cond: (id = ct_6.id_tech)
  • Filter: (id_pult = p.id)
  • Rows Removed by Filter: 0
28. 0.000 3,455.130 ↑ 1.0 1 493,590

Aggregate (cost=16.75..16.76 rows=1 width=8) (actual time=0.007..0.007 rows=1 loops=493,590)

29. 339.342 3,455.130 ↑ 1.0 1 493,590

Nested Loop (cost=0.70..16.75 rows=1 width=8) (actual time=0.006..0.007 rows=1 loops=493,590)

30. 1,974.360 1,974.360 ↑ 1.0 1 493,590

Index Scan using call_tech_atplace_call_idx on call_tech ct_7 (cost=0.42..8.44 rows=1 width=13) (actual time=0.004..0.004 rows=1 loops=493,590)

  • Index Cond: (id_call = rpe.id_call)
31. 1,141.428 1,141.428 ↑ 1.0 1 380,476

Index Scan using technika_sys_c0042500 on technika t_5 (cost=0.28..8.30 rows=1 width=5) (actual time=0.003..0.003 rows=1 loops=380,476)

  • Index Cond: (id = ct_7.id_tech)
  • Filter: (id_pult = p.id)
  • Rows Removed by Filter: 0
32.          

SubPlan (forSubquery Scan)

33. 556.094 8,897.504 ↑ 1.0 1 556,094

Result (cost=3.11..3.12 rows=1 width=0) (actual time=0.016..0.016 rows=1 loops=556,094)

34.          

Initplan (forResult)

35. 556.094 8,341.410 ↑ 1.0 1 556,094

Limit (cost=0.56..3.11 rows=1 width=8) (actual time=0.015..0.015 rows=1 loops=556,094)

36. 7,785.316 7,785.316 ↑ 4.0 1 556,094

Index Only Scan using call_action_data_idx on call_action ca_9 (cost=0.56..10.78 rows=4 width=8) (actual time=0.014..0.014 rows=1 loops=556,094)

  • Index Cond: ((id_call = "*SELECT* 1".id_call) AND (dtime IS NOT NULL))
  • Filter: (id_action = ANY ('{65030,65049,65058}'::numeric[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 93419
37. 0.000 69.584 ↑ 1.0 1 8,698

Result (cost=3.11..3.12 rows=1 width=0) (actual time=0.008..0.008 rows=1 loops=8,698)

38.          

Initplan (forResult)

39. 8.698 69.584 ↓ 0.0 0 8,698

Limit (cost=0.56..3.11 rows=1 width=8) (actual time=0.008..0.008 rows=0 loops=8,698)

40. 60.886 60.886 ↓ 0.0 0 8,698

Index Only Scan using call_action_data_idx on call_action ca_10 (cost=0.56..10.78 rows=4 width=8) (actual time=0.007..0.007 rows=0 loops=8,698)

  • Index Cond: ((id_call = "*SELECT* 1".id_call) AND (dtime IS NOT NULL))
  • Filter: (id_action = ANY ('{65030,65049,65058}'::numeric[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 9537
41. 949.405 11,392.860 ↑ 1.0 1 949,405

Result (cost=3.11..3.12 rows=1 width=0) (actual time=0.012..0.012 rows=1 loops=949,405)

42.          

Initplan (forResult)

43. 949.405 10,443.455 ↑ 1.0 1 949,405

Limit (cost=0.56..3.11 rows=1 width=8) (actual time=0.011..0.011 rows=1 loops=949,405)

44. 9,494.050 9,494.050 ↑ 4.0 1 949,405

Index Only Scan using call_action_data_idx on call_action ca_11 (cost=0.56..10.78 rows=4 width=8) (actual time=0.010..0.010 rows=1 loops=949,405)

  • Index Cond: ((id_call = "*SELECT* 1".id_call) AND (dtime IS NOT NULL))
  • Filter: (id_action = ANY ('{65030,65049,65058}'::numeric[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 157671
45. 0.000 142,843.140 ↑ 55.7 83 1

Subquery Scan on *SELECT* 2 (cost=110,020.33..5,701,297.09 rows=4,620 width=60) (actual time=7,426.508..142,843.140 rows=83 loops=1)

  • Filter: (((("*SELECT* 2".own_pult IS NULL) OR ("*SELECT* 2".own_pult <> "*SELECT* 2".cascade_id)) AND ((SubPlan 31) >= '2019-06-04 07:40:18'::timestamp without time zone) AND ((SubPlan 33) <= '2019-06-05 07:40:18'::timestamp without time zone)) OR (((SubPlan 35) IS NULL) AND ("*SELECT* 2".reg_time >= '2019-06-04 07:40:18'::timestamp without time zone) AND ("*SELECT* 2".reg_time <= '2019-06-05 07:40:18'::timestamp without time zone)))
  • Rows Removed by Filter: 432162
46. 5,295.648 134,098.282 ↓ 10.4 432,245 1

Hash Join (cost=110,020.33..5,309,685.70 rows=41,681 width=44) (actual time=1,765.079..134,098.282 rows=432,245 loops=1)

  • Hash Cond: (rpe_1.id_call = ce_1.id)
  • Join Filter: (((SubPlan 41) > 0) OR ((SubPlan 42) = 1))
  • Rows Removed by Join Filter: 382352
47. 588.351 880.339 ↓ 6.2 815,049 1

Hash Join (cost=12.85..48,196.04 rows=132,168 width=25) (actual time=0.192..880.339 rows=815,049 loops=1)

  • Hash Cond: (rpe_1.server_cid = p_1.id)
48. 291.838 291.838 ↓ 1.0 1,308,639 1

Seq Scan on ref_pult_event rpe_1 (cost=0.00..41,976.01 rows=1,302,801 width=16) (actual time=0.014..291.838 rows=1,308,639 loops=1)

49. 0.008 0.150 ↑ 1.0 21 1

Hash (cost=12.59..12.59 rows=21 width=14) (actual time=0.150..0.150 rows=21 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
50. 0.142 0.142 ↑ 1.0 21 1

Seq Scan on pult p_1 (cost=0.00..12.59 rows=21 width=14) (actual time=0.023..0.142 rows=21 loops=1)

  • Filter: (id_scope = 1::numeric)
  • Rows Removed by Filter: 186
51. 630.678 1,762.117 ↑ 1.0 1,518,761 1

Hash (cost=80,579.19..80,579.19 rows=1,521,943 width=25) (actual time=1,762.117..1,762.117 rows=1,518,761 loops=1)

  • Buckets: 2048 Batches: 128 Memory Usage: 702kB
52. 1,131.439 1,131.439 ↑ 1.0 1,518,761 1

Seq Scan on call_event ce_1 (cost=0.00..80,579.19 rows=1,521,943 width=25) (actual time=0.015..1,131.439 rows=1,518,761 loops=1)

  • Filter: (wrong_call = 0::numeric)
  • Rows Removed by Filter: 104888
53.          

SubPlan (forHash Join)

54. 0.000 3,890.205 ↑ 1.0 1 432,245

Aggregate (cost=16.75..16.76 rows=1 width=8) (actual time=0.009..0.009 rows=1 loops=432,245)

55. 697.405 3,890.205 ↓ 0.0 0 432,245

Nested Loop (cost=0.70..16.75 rows=1 width=8) (actual time=0.009..0.009 rows=0 loops=432,245)

56. 3,025.715 3,025.715 ↓ 0.0 0 432,245

Index Scan using call_tech_atplace_call_idx on call_tech ct_8 (cost=0.42..8.44 rows=1 width=13) (actual time=0.007..0.007 rows=0 loops=432,245)

  • Index Cond: (id_call = rpe_1.id_call)
57. 167.085 167.085 ↓ 0.0 0 33,417

Index Scan using technika_sys_c0042500 on technika t_6 (cost=0.28..8.30 rows=1 width=5) (actual time=0.005..0.005 rows=0 loops=33,417)

  • Index Cond: (id = ct_8.id_tech)
  • Filter: (id_pult = p_1.id)
  • Rows Removed by Filter: 1
58. 432.245 2,161.225 ↑ 1.0 1 432,245

Aggregate (cost=16.75..16.76 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=432,245)

59. 331.994 1,728.980 ↓ 0.0 0 432,245

Nested Loop (cost=0.70..16.75 rows=1 width=8) (actual time=0.004..0.004 rows=0 loops=432,245)

60. 1,296.735 1,296.735 ↓ 0.0 0 432,245

Index Scan using call_tech_atplace_call_idx on call_tech ct_9 (cost=0.42..8.44 rows=1 width=13) (actual time=0.003..0.003 rows=0 loops=432,245)

  • Index Cond: (id_call = rpe_1.id_call)
61. 100.251 100.251 ↓ 0.0 0 33,417

Index Scan using technika_sys_c0042500 on technika t_7 (cost=0.28..8.30 rows=1 width=5) (actual time=0.003..0.003 rows=0 loops=33,417)

  • Index Cond: (id = ct_9.id_tech)
  • Filter: (id_pult = p_1.id)
  • Rows Removed by Filter: 1
62. 1,629.194 115,672.774 ↑ 1.0 1 814,597

Aggregate (cost=21.71..21.72 rows=1 width=0) (actual time=0.142..0.142 rows=1 loops=814,597)

63. 5,702.179 114,043.580 ↓ 0.0 0 814,597

Hash Join (cost=8.49..21.71 rows=1 width=0) (actual time=0.134..0.140 rows=0 loops=814,597)

  • Hash Cond: (pp_1.id = rfpe_4.server_cid)
64. 96,122.446 96,122.446 ↑ 1.1 20 814,597

Seq Scan on pult pp_1 (cost=0.00..13.11 rows=21 width=4) (actual time=0.008..0.118 rows=20 loops=814,597)

  • Filter: (((cascade_id <> ce_1.own_pult) OR (ce_1.own_pult IS NULL)) AND (id_scope = 1::numeric))
  • Rows Removed by Filter: 187
65. 1,629.194 12,218.955 ↑ 1.0 2 814,597

Hash (cost=8.46..8.46 rows=2 width=5) (actual time=0.015..0.015 rows=2 loops=814,597)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
66. 10,589.761 10,589.761 ↑ 1.0 2 814,597

Index Only Scan using ref_pult_event_status_idx on ref_pult_event rfpe_4 (cost=0.43..8.46 rows=2 width=5) (actual time=0.012..0.013 rows=2 loops=814,597)

  • Index Cond: (id_call = rpe_1.id_call)
  • Heap Fetches: 670156
67. 739.329 4,435.974 ↑ 1.0 1 739,329

Aggregate (cost=8.47..8.48 rows=1 width=0) (actual time=0.006..0.006 rows=1 loops=739,329)

68. 3,696.645 3,696.645 ↑ 1.0 2 739,329

Index Only Scan using ref_pult_event_status_idx on ref_pult_event rfpe_5 (cost=0.43..8.46 rows=2 width=0) (actual time=0.004..0.005 rows=2 loops=739,329)

  • Index Cond: (id_call = rpe_1.id_call)
  • Heap Fetches: 549401
69.          

SubPlan (forSubquery Scan)

70. 556.094 8,897.504 ↑ 1.0 1 556,094

Result (cost=3.11..3.12 rows=1 width=0) (actual time=0.016..0.016 rows=1 loops=556,094)

71.          

Initplan (forResult)

72. 556.094 8,341.410 ↑ 1.0 1 556,094

Limit (cost=0.56..3.11 rows=1 width=8) (actual time=0.015..0.015 rows=1 loops=556,094)

73. 7,785.316 7,785.316 ↑ 4.0 1 556,094

Index Only Scan using call_action_data_idx on call_action ca_9 (cost=0.56..10.78 rows=4 width=8) (actual time=0.014..0.014 rows=1 loops=556,094)

  • Index Cond: ((id_call = "*SELECT* 2".id_call) AND (dtime IS NOT NULL))
  • Filter: (id_action = ANY ('{65030,65049,65058}'::numeric[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 93419
74. 0.000 69.584 ↑ 1.0 1 8,698

Result (cost=3.11..3.12 rows=1 width=0) (actual time=0.008..0.008 rows=1 loops=8,698)

75.          

Initplan (forResult)

76. 8.698 69.584 ↓ 0.0 0 8,698

Limit (cost=0.56..3.11 rows=1 width=8) (actual time=0.008..0.008 rows=0 loops=8,698)

77. 60.886 60.886 ↓ 0.0 0 8,698

Index Only Scan using call_action_data_idx on call_action ca_10 (cost=0.56..10.78 rows=4 width=8) (actual time=0.007..0.007 rows=0 loops=8,698)

  • Index Cond: ((id_call = "*SELECT* 2".id_call) AND (dtime IS NOT NULL))
  • Filter: (id_action = ANY ('{65030,65049,65058}'::numeric[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 9537
78. 949.405 11,392.860 ↑ 1.0 1 949,405

Result (cost=3.11..3.12 rows=1 width=0) (actual time=0.012..0.012 rows=1 loops=949,405)

79.          

Initplan (forResult)

80. 949.405 10,443.455 ↑ 1.0 1 949,405

Limit (cost=0.56..3.11 rows=1 width=8) (actual time=0.011..0.011 rows=1 loops=949,405)

81. 9,494.050 9,494.050 ↑ 4.0 1 949,405

Index Only Scan using call_action_data_idx on call_action ca_11 (cost=0.56..10.78 rows=4 width=8) (actual time=0.010..0.010 rows=1 loops=949,405)

  • Index Cond: ((id_call = "*SELECT* 2".id_call) AND (dtime IS NOT NULL))
  • Filter: (id_action = ANY ('{65030,65049,65058}'::numeric[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 157671
82. 0.000 3,326.377 ↑ 18.4 14 1

Subquery Scan on *SELECT* 3 (cost=18,639.96..16,270,566.73 rows=258 width=97) (actual time=3,232.359..3,326.377 rows=14 loops=1)

  • Filter: (((("*SELECT* 3".own_pult IS NULL) OR ("*SELECT* 3".own_pult <> "*SELECT* 3".cascade_id)) AND ((SubPlan 31) >= '2019-06-04 07:40:18'::timestamp without time zone) AND ((SubPlan 33) <= '2019-06-05 07:40:18'::timestamp without time zone)) OR (((SubPlan 35) IS NULL) AND ("*SELECT* 3".reg_time >= '2019-06-04 07:40:18'::timestamp without time zone) AND ("*SELECT* 3".reg_time <= '2019-06-05 07:40:18'::timestamp without time zone)))
  • Rows Removed by Filter: 24211
83. 1,178.330 2,771.174 ↓ 10.4 24,225 1

Bitmap Heap Scan on call_event ce_2 (cost=18,639.96..16,248,628.37 rows=2,335 width=20) (actual time=133.904..2,771.174 rows=24,225 loops=1)

  • Recheck Cond: (own_pult IS NULL)
  • Rows Removed by Index Recheck: 601115
  • Filter: (((id_src_type IS NULL) OR (id_src_type <> 8::numeric)) AND (wrong_call = 0::numeric) AND ((SubPlan 48) = 0) AND ((SubPlan 47) <> 4::numeric))
  • Rows Removed by Filter: 811119
84. 111.755 111.755 ↓ 1.0 844,129 1

Bitmap Index Scan on call_event_idx16 (cost=0.00..18,639.38 rows=835,060 width=0) (actual time=111.755..111.755 rows=844,129 loops=1)

  • Index Cond: (own_pult IS NULL)
85.          

SubPlan (forBitmap Heap Scan)

86. 24.225 169.575 ↑ 1.0 1 24,225

Result (cost=8.44..8.45 rows=1 width=0) (actual time=0.007..0.007 rows=1 loops=24,225)

87.          

Initplan (forResult)

88. 0.000 145.350 ↓ 0.0 0 24,225

Limit (cost=0.42..8.44 rows=1 width=8) (actual time=0.006..0.006 rows=0 loops=24,225)

89. 145.350 145.350 ↓ 0.0 0 24,225

Index Only Scan using call_tech_send_call_idx on call_tech ct_10 (cost=0.42..8.44 rows=1 width=8) (actual time=0.006..0.006 rows=0 loops=24,225)

  • Index Cond: ((id_call = ce_2.id) AND (send_time IS NOT NULL))
  • Heap Fetches: 0
90. 24.225 145.350 ↑ 1.0 1 24,225

Result (cost=8.44..8.45 rows=1 width=0) (actual time=0.006..0.006 rows=1 loops=24,225)

91.          

Initplan (forResult)

92. 0.000 121.125 ↓ 0.0 0 24,225

Limit (cost=0.42..8.44 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=24,225)

93. 121.125 121.125 ↓ 0.0 0 24,225

Index Only Scan using call_tech_atplace_call_idx on call_tech ct_11 (cost=0.42..8.44 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=24,225)

  • Index Cond: ((id_call = ce_2.id) AND (at_place_time IS NOT NULL))
  • Heap Fetches: 0
94. 81.668 653.344 ↑ 1.0 1 81,668

Aggregate (cost=8.47..8.48 rows=1 width=0) (actual time=0.008..0.008 rows=1 loops=81,668)

95. 571.676 571.676 ↑ 2.0 1 81,668

Index Only Scan using ref_pult_event_status_idx on ref_pult_event ref_pult_event_1 (cost=0.43..8.46 rows=2 width=0) (actual time=0.006..0.007 rows=1 loops=81,668)

  • Index Cond: (id_call = ce_2.id)
  • Heap Fetches: 45478
96. 287.703 512.820 ↑ 1.0 1 25,641

Hash Join (cost=8.30..10.82 rows=1 width=5) (actual time=0.017..0.020 rows=1 loops=25,641)

  • Hash Cond: (et_1.id = r_1.event_type_id)
97. 96.912 96.912 ↑ 1.0 37 24,228

Seq Scan on event_type et_1 (cost=0.00..2.37 rows=37 width=10) (actual time=0.001..0.004 rows=37 loops=24,228)

98. 25.641 128.205 ↑ 1.0 1 25,641

Hash (cost=8.29..8.29 rows=1 width=5) (actual time=0.005..0.005 rows=1 loops=25,641)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
99. 102.564 102.564 ↑ 1.0 1 25,641

Index Scan using rank_sys_c0042610 on rank r_1 (cost=0.27..8.29 rows=1 width=5) (actual time=0.003..0.004 rows=1 loops=25,641)

  • Index Cond: (ce_2.id_rank = id)
100.          

SubPlan (forSubquery Scan)

101. 556.094 8,897.504 ↑ 1.0 1 556,094

Result (cost=3.11..3.12 rows=1 width=0) (actual time=0.016..0.016 rows=1 loops=556,094)

102.          

Initplan (forResult)

103. 556.094 8,341.410 ↑ 1.0 1 556,094

Limit (cost=0.56..3.11 rows=1 width=8) (actual time=0.015..0.015 rows=1 loops=556,094)

104. 7,785.316 7,785.316 ↑ 4.0 1 556,094

Index Only Scan using call_action_data_idx on call_action ca_9 (cost=0.56..10.78 rows=4 width=8) (actual time=0.014..0.014 rows=1 loops=556,094)

  • Index Cond: ((id_call = "*SELECT* 3".id_call) AND (dtime IS NOT NULL))
  • Filter: (id_action = ANY ('{65030,65049,65058}'::numeric[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 93419
105. 0.000 69.584 ↑ 1.0 1 8,698

Result (cost=3.11..3.12 rows=1 width=0) (actual time=0.008..0.008 rows=1 loops=8,698)

106.          

Initplan (forResult)

107. 8.698 69.584 ↓ 0.0 0 8,698

Limit (cost=0.56..3.11 rows=1 width=8) (actual time=0.008..0.008 rows=0 loops=8,698)

108. 60.886 60.886 ↓ 0.0 0 8,698

Index Only Scan using call_action_data_idx on call_action ca_10 (cost=0.56..10.78 rows=4 width=8) (actual time=0.007..0.007 rows=0 loops=8,698)

  • Index Cond: ((id_call = "*SELECT* 3".id_call) AND (dtime IS NOT NULL))
  • Filter: (id_action = ANY ('{65030,65049,65058}'::numeric[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 9537
109. 949.405 11,392.860 ↑ 1.0 1 949,405

Result (cost=3.11..3.12 rows=1 width=0) (actual time=0.012..0.012 rows=1 loops=949,405)

110.          

Initplan (forResult)

111. 949.405 10,443.455 ↑ 1.0 1 949,405

Limit (cost=0.56..3.11 rows=1 width=8) (actual time=0.011..0.011 rows=1 loops=949,405)

112. 9,494.050 9,494.050 ↑ 4.0 1 949,405

Index Only Scan using call_action_data_idx on call_action ca_11 (cost=0.56..10.78 rows=4 width=8) (actual time=0.010..0.010 rows=1 loops=949,405)

  • Index Cond: ((id_call = "*SELECT* 3".id_call) AND (dtime IS NOT NULL))
  • Filter: (id_action = ANY ('{65030,65049,65058}'::numeric[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 157671
113.          

SubPlan (forResult)

114. 0.657 7.884 ↑ 1.0 1 657

Result (cost=3.11..3.12 rows=1 width=0) (actual time=0.012..0.012 rows=1 loops=657)

115.          

Initplan (forResult)

116. 1.314 7.227 ↑ 1.0 1 657

Limit (cost=0.56..3.11 rows=1 width=8) (actual time=0.011..0.011 rows=1 loops=657)

117. 5.913 5.913 ↑ 4.0 1 657

Index Only Scan using call_action_data_idx on call_action ca_6 (cost=0.56..10.78 rows=4 width=8) (actual time=0.009..0.009 rows=1 loops=657)

  • Index Cond: ((id_call = "*SELECT* 1".id_call) AND (dtime IS NOT NULL))
  • Filter: (id_action = ANY ('{65030,65049,65058}'::numeric[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 1441
118. 1.314 94.608 ↑ 1.0 1 657

Aggregate (cost=167.31..167.32 rows=1 width=8) (actual time=0.144..0.144 rows=1 loops=657)

119. 4.980 93.294 ↓ 2.0 2 657

Nested Loop (cost=0.72..167.31 rows=1 width=8) (actual time=0.121..0.142 rows=2 loops=657)

120. 21.681 21.681 ↑ 1.4 14 657

Index Scan using call_action_idx on call_action ca_7 (cost=0.43..8.86 rows=20 width=14) (actual time=0.019..0.033 rows=14 loops=657)

  • Index Cond: (id_call = "*SELECT* 1".id_call)
121. 66.633 66.633 ↓ 0.0 0 9,519

Index Scan using standart_phrases_sys_c0042494 on standart_phrases st_1 (cost=0.29..7.91 rows=1 width=6) (actual time=0.007..0.007 rows=0 loops=9,519)

  • Index Cond: (id = ca_7.id_action)
  • Filter: (upper((caption)::text) ~~ 'ПРИЁМ ВЫЗОВА%'::text)
  • Rows Removed by Filter: 1
122. 1.314 9.198 ↑ 1.0 1 657

Result (cost=3.11..3.12 rows=1 width=0) (actual time=0.014..0.014 rows=1 loops=657)

123.          

Initplan (forResult)

124. 0.657 7.884 ↑ 1.0 1 657

Limit (cost=0.56..3.11 rows=1 width=8) (actual time=0.012..0.012 rows=1 loops=657)

125. 7.227 7.227 ↑ 4.0 1 657

Index Only Scan using call_action_data_idx on call_action ca_8 (cost=0.56..10.78 rows=4 width=8) (actual time=0.011..0.011 rows=1 loops=657)

  • Index Cond: ((id_call = "*SELECT* 1".id_call) AND (dtime IS NOT NULL))
  • Filter: (id_action = ANY ('{65030,65049,65058}'::numeric[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 1441
126. 0.779 183,886.849 ↑ 11.9 1,133 1

Unique (cost=105,782,406.15..105,788,142.12 rows=13,497 width=60) (actual time=183,885.976..183,886.849 rows=1,133 loops=1)

127. 3.970 183,886.070 ↑ 119.1 1,133 1

Sort (cost=105,782,406.15..105,782,743.56 rows=134,964 width=60) (actual time=183,885.975..183,886.070 rows=1,133 loops=1)

  • Sort Key: "*SELECT* 1_1".id_call, "*SELECT* 1_1".cascade_id, "*SELECT* 1_1".send_time, "*SELECT* 1_1".status, (CASE WHEN ("*SELECT* 1_1".service_status IS NULL) THEN 10::numeric ELSE "*SELECT* 1_1".service_status END), "*SELECT* 1_1".id_scope, (CASE WHEN ("*SELECT* 1_1".id_scope = 1::numeric) THEN 1 ELSE 0 END), (CASE WHEN ("*SELECT* 1_1".id_scope = 2::numeric) THEN 1 ELSE 0 END), (CASE WHEN ("*SELECT* 1_1".id_scope = 3::numeric) THEN 1 ELSE 0 END), (CASE WHEN ("*SELECT* 1_1".id_scope = 4::numeric) THEN 1 ELSE 0 END), (CASE WHEN ("*SELECT* 1_1".id_scope = 5::numeric) THEN 1 ELSE 0 END), (CASE WHEN ("*SELECT* 1_1".id_scope = 6::numeric) THEN 1 ELSE 0 END), ((GREATEST("*SELECT* 1_1".reg_time, (SubPlan 2)) - (SubPlan 3))), (("*SELECT* 1_1".send_time - GREATEST("*SELECT* 1_1".reg_time, (SubPlan 5)))), (("*SELECT* 1_1".at_place_time - "*SELECT* 1_1".send_time)), "*SELECT* 1_1".victim_count
  • Sort Method: quicksort Memory: 242kB
128. 12.695 183,882.100 ↑ 119.1 1,133 1

Result (cost=107,963.11..105,765,830.72 rows=134,964 width=60) (actual time=1,660.797..183,882.100 rows=1,133 loops=1)

129. 0.577 183,724.381 ↑ 119.1 1,133 1

Append (cost=107,963.11..82,337,119.23 rows=134,964 width=60) (actual time=1,660.496..183,724.381 rows=1,133 loops=1)

130. 0.000 34,940.366 ↑ 225.8 576 1

Subquery Scan on *SELECT* 1_1 (cost=107,963.11..60,365,365.45 rows=130,074 width=60) (actual time=1,660.495..34,940.366 rows=576 loops=1)

  • Filter: ((((SubPlan 7) >= '2019-06-04 07:40:18'::timestamp without time zone) AND ((SubPlan 9) <= '2019-06-05 07:40:18'::timestamp without time zone)) OR (((SubPlan 11) IS NULL) AND ("*SELECT* 1_1".reg_time >= '2019-06-04 07:40:18'::timestamp without time zone) AND ("*SELECT* 1_1".reg_time <= '2019-06-05 07:40:18'::timestamp without time zone)))
  • Rows Removed by Filter: 493014
131. 1,324.822 22,019.100 ↑ 2.4 493,590 1

Hash Left Join (cost=107,963.11..49,369,678.31 rows=1,170,633 width=48) (actual time=1,601.135..22,019.100 rows=493,590 loops=1)

  • Hash Cond: (ce_3.own_pult = op_1.cascade_id)
132. 541.964 4,745.475 ↑ 2.4 493,590 1

Hash Join (cost=107,948.45..216,403.31 rows=1,170,633 width=44) (actual time=1,600.847..4,745.475 rows=493,590 loops=1)

  • Hash Cond: (rpe_2.server_cid = p_2.id)
133. 2,227.184 4,203.326 ↓ 1.0 1,308,639 1

Hash Join (cost=107,933.54..199,796.57 rows=1,302,801 width=35) (actual time=1,600.648..4,203.326 rows=1,308,639 loops=1)

  • Hash Cond: (rpe_2.id_call = ce_3.id)
134. 376.736 376.736 ↓ 1.0 1,308,639 1

Seq Scan on ref_pult_event rpe_2 (cost=0.00..41,976.01 rows=1,302,801 width=16) (actual time=0.007..376.736 rows=1,308,639 loops=1)

135. 670.365 1,599.406 ↑ 1.0 1,623,649 1

Hash (cost=76,517.35..76,517.35 rows=1,624,735 width=25) (actual time=1,599.406..1,599.406 rows=1,623,649 loops=1)

  • Buckets: 2048 Batches: 128 Memory Usage: 750kB
136. 929.041 929.041 ↑ 1.0 1,623,649 1

Seq Scan on call_event ce_3 (cost=0.00..76,517.35 rows=1,624,735 width=25) (actual time=0.009..929.041 rows=1,623,649 loops=1)

137. 0.040 0.185 ↑ 1.4 135 1

Hash (cost=12.59..12.59 rows=186 width=14) (actual time=0.185..0.185 rows=135 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 7kB
138. 0.145 0.145 ↑ 1.4 135 1

Seq Scan on pult p_2 (cost=0.00..12.59 rows=186 width=14) (actual time=0.011..0.145 rows=135 loops=1)

  • Filter: (id_scope <> 1::numeric)
  • Rows Removed by Filter: 72
139. 0.072 0.161 ↑ 1.0 207 1

Hash (cost=12.07..12.07 rows=207 width=9) (actual time=0.161..0.161 rows=207 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
140. 0.089 0.089 ↑ 1.0 207 1

Seq Scan on pult op_1 (cost=0.00..12.07 rows=207 width=9) (actual time=0.006..0.089 rows=207 loops=1)

141.          

SubPlan (forHash Left Join)

142. 5,583.252 5,583.252 ↑ 1.0 1 465,271

Index Only Scan using ref_pult_event_status_idx on ref_pult_event rfpe (cost=0.43..8.45 rows=1 width=5) (actual time=0.011..0.012 rows=1 loops=465,271)

  • Index Cond: ((id_call = rpe_2.id_call) AND (server_cid = op_1.id))
  • Heap Fetches: 197713
143. 493.590 6,416.670 ↑ 1.0 1 493,590

Aggregate (cost=16.75..16.76 rows=1 width=8) (actual time=0.013..0.013 rows=1 loops=493,590)

144. 452.456 5,923.080 ↑ 1.0 1 493,590

Nested Loop (cost=0.70..16.75 rows=1 width=8) (actual time=0.011..0.012 rows=1 loops=493,590)

145. 3,948.720 3,948.720 ↑ 1.0 1 493,590

Index Scan using call_tech_atplace_call_idx on call_tech ct (cost=0.42..8.44 rows=1 width=13) (actual time=0.008..0.008 rows=1 loops=493,590)

  • Index Cond: (id_call = rpe_2.id_call)
146. 1,521.904 1,521.904 ↑ 1.0 1 380,476

Index Scan using technika_sys_c0042500 on technika t (cost=0.28..8.30 rows=1 width=5) (actual time=0.003..0.004 rows=1 loops=380,476)

  • Index Cond: (id = ct.id_tech)
  • Filter: (id_pult = p_2.id)
  • Rows Removed by Filter: 0
147. 493.590 3,948.720 ↑ 1.0 1 493,590

Aggregate (cost=16.75..16.76 rows=1 width=8) (actual time=0.007..0.008 rows=1 loops=493,590)

148. 339.342 3,455.130 ↑ 1.0 1 493,590

Nested Loop (cost=0.70..16.75 rows=1 width=8) (actual time=0.006..0.007 rows=1 loops=493,590)

149. 1,974.360 1,974.360 ↑ 1.0 1 493,590

Index Scan using call_tech_atplace_call_idx on call_tech ct_1 (cost=0.42..8.44 rows=1 width=13) (actual time=0.004..0.004 rows=1 loops=493,590)

  • Index Cond: (id_call = rpe_2.id_call)
150. 1,141.428 1,141.428 ↑ 1.0 1 380,476

Index Scan using technika_sys_c0042500 on technika t_1 (cost=0.28..8.30 rows=1 width=5) (actual time=0.003..0.003 rows=1 loops=380,476)

  • Index Cond: (id = ct_1.id_tech)
  • Filter: (id_pult = p_2.id)
  • Rows Removed by Filter: 0
151.          

SubPlan (forSubquery Scan)

152. 950.060 16,151.020 ↑ 1.0 1 950,060

Result (cost=3.11..3.12 rows=1 width=0) (actual time=0.016..0.017 rows=1 loops=950,060)

153.          

Initplan (forResult)

154. 950.060 15,200.960 ↑ 1.0 1 950,060

Limit (cost=0.56..3.11 rows=1 width=8) (actual time=0.015..0.016 rows=1 loops=950,060)

155. 14,250.900 14,250.900 ↑ 4.0 1 950,060

Index Only Scan using call_action_data_idx on call_action ca_3 (cost=0.56..10.78 rows=4 width=8) (actual time=0.015..0.015 rows=1 loops=950,060)

  • Index Cond: ((id_call = "*SELECT* 1_1".id_call) AND (dtime IS NOT NULL))
  • Filter: (id_action = ANY ('{65030,65049,65058}'::numeric[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 159081
156. 18.146 145.168 ↑ 1.0 1 18,146

Result (cost=3.11..3.12 rows=1 width=0) (actual time=0.008..0.008 rows=1 loops=18,146)

157.          

Initplan (forResult)

158. 18.146 127.022 ↓ 0.0 0 18,146

Limit (cost=0.56..3.11 rows=1 width=8) (actual time=0.007..0.007 rows=0 loops=18,146)

159. 108.876 108.876 ↓ 0.0 0 18,146

Index Only Scan using call_action_data_idx on call_action ca_4 (cost=0.56..10.78 rows=4 width=8) (actual time=0.006..0.006 rows=0 loops=18,146)

  • Index Cond: ((id_call = "*SELECT* 1_1".id_call) AND (dtime IS NOT NULL))
  • Filter: (id_action = ANY ('{65030,65049,65058}'::numeric[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 15989
160. 948.929 7,591.432 ↑ 1.0 1 948,929

Result (cost=3.11..3.12 rows=1 width=0) (actual time=0.008..0.008 rows=1 loops=948,929)

161.          

Initplan (forResult)

162. 948.929 6,642.503 ↑ 1.0 1 948,929

Limit (cost=0.56..3.11 rows=1 width=8) (actual time=0.007..0.007 rows=1 loops=948,929)

163. 5,693.574 5,693.574 ↑ 4.0 1 948,929

Index Only Scan using call_action_data_idx on call_action ca_5 (cost=0.56..10.78 rows=4 width=8) (actual time=0.006..0.006 rows=1 loops=948,929)

  • Index Cond: ((id_call = "*SELECT* 1_1".id_call) AND (dtime IS NOT NULL))
  • Filter: (id_action = ANY ('{65030,65049,65058}'::numeric[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 156658
164. 0.000 145,483.233 ↑ 8.5 543 1

Subquery Scan on *SELECT* 2_1 (cost=110,020.33..5,701,192.89 rows=4,631 width=60) (actual time=1,835.648..145,483.233 rows=543 loops=1)

  • Filter: ((((SubPlan 7) >= '2019-06-04 07:40:18'::timestamp without time zone) AND ((SubPlan 9) <= '2019-06-05 07:40:18'::timestamp without time zone)) OR (((SubPlan 11) IS NULL) AND ("*SELECT* 2_1".reg_time >= '2019-06-04 07:40:18'::timestamp without time zone) AND ("*SELECT* 2_1".reg_time <= '2019-06-05 07:40:18'::timestamp without time zone)))
  • Rows Removed by Filter: 431702
165. 4,182.945 133,815.059 ↓ 10.4 432,245 1

Hash Join (cost=110,020.33..5,309,685.70 rows=41,681 width=44) (actual time=1,762.806..133,815.059 rows=432,245 loops=1)

  • Hash Cond: (rpe_3.id_call = ce_4.id)
  • Join Filter: (((SubPlan 17) > 0) OR ((SubPlan 18) = 1))
  • Rows Removed by Join Filter: 382352
166. 597.029 897.584 ↓ 6.2 815,049 1

Hash Join (cost=12.85..48,196.04 rows=132,168 width=25) (actual time=0.193..897.584 rows=815,049 loops=1)

  • Hash Cond: (rpe_3.server_cid = p_3.id)
167. 300.405 300.405 ↓ 1.0 1,308,639 1

Seq Scan on ref_pult_event rpe_3 (cost=0.00..41,976.01 rows=1,302,801 width=16) (actual time=0.016..300.405 rows=1,308,639 loops=1)

168. 0.005 0.150 ↑ 1.0 21 1

Hash (cost=12.59..12.59 rows=21 width=14) (actual time=0.150..0.150 rows=21 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
169. 0.145 0.145 ↑ 1.0 21 1

Seq Scan on pult p_3 (cost=0.00..12.59 rows=21 width=14) (actual time=0.019..0.145 rows=21 loops=1)

  • Filter: (id_scope = 1::numeric)
  • Rows Removed by Filter: 186
170. 628.946 1,759.755 ↑ 1.0 1,518,761 1

Hash (cost=80,579.19..80,579.19 rows=1,521,943 width=25) (actual time=1,759.755..1,759.755 rows=1,518,761 loops=1)

  • Buckets: 2048 Batches: 128 Memory Usage: 702kB
171. 1,130.809 1,130.809 ↑ 1.0 1,518,761 1

Seq Scan on call_event ce_4 (cost=0.00..80,579.19 rows=1,521,943 width=25) (actual time=0.029..1,130.809 rows=1,518,761 loops=1)

  • Filter: (wrong_call = 0::numeric)
  • Rows Removed by Filter: 104888
172.          

SubPlan (forHash Join)

173. 0.000 3,890.205 ↑ 1.0 1 432,245

Aggregate (cost=16.75..16.76 rows=1 width=8) (actual time=0.009..0.009 rows=1 loops=432,245)

174. 265.160 3,890.205 ↓ 0.0 0 432,245

Nested Loop (cost=0.70..16.75 rows=1 width=8) (actual time=0.009..0.009 rows=0 loops=432,245)

175. 3,457.960 3,457.960 ↓ 0.0 0 432,245

Index Scan using call_tech_atplace_call_idx on call_tech ct_2 (cost=0.42..8.44 rows=1 width=13) (actual time=0.007..0.008 rows=0 loops=432,245)

  • Index Cond: (id_call = rpe_3.id_call)
176. 167.085 167.085 ↓ 0.0 0 33,417

Index Scan using technika_sys_c0042500 on technika t_2 (cost=0.28..8.30 rows=1 width=5) (actual time=0.005..0.005 rows=0 loops=33,417)

  • Index Cond: (id = ct_2.id_tech)
  • Filter: (id_pult = p_3.id)
  • Rows Removed by Filter: 1
177. 432.245 2,161.225 ↑ 1.0 1 432,245

Aggregate (cost=16.75..16.76 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=432,245)

178. 331.994 1,728.980 ↓ 0.0 0 432,245

Nested Loop (cost=0.70..16.75 rows=1 width=8) (actual time=0.004..0.004 rows=0 loops=432,245)

179. 1,296.735 1,296.735 ↓ 0.0 0 432,245

Index Scan using call_tech_atplace_call_idx on call_tech ct_3 (cost=0.42..8.44 rows=1 width=13) (actual time=0.003..0.003 rows=0 loops=432,245)

  • Index Cond: (id_call = rpe_3.id_call)
180. 100.251 100.251 ↓ 0.0 0 33,417

Index Scan using technika_sys_c0042500 on technika t_3 (cost=0.28..8.30 rows=1 width=5) (actual time=0.003..0.003 rows=0 loops=33,417)

  • Index Cond: (id = ct_3.id_tech)
  • Filter: (id_pult = p_3.id)
  • Rows Removed by Filter: 1
181. 1,629.194 116,487.371 ↑ 1.0 1 814,597

Aggregate (cost=21.71..21.72 rows=1 width=0) (actual time=0.143..0.143 rows=1 loops=814,597)

182. 5,702.179 114,858.177 ↓ 0.0 0 814,597

Hash Join (cost=8.49..21.71 rows=1 width=0) (actual time=0.135..0.141 rows=0 loops=814,597)

  • Hash Cond: (pp.id = rfpe_1.server_cid)
183. 96,937.043 96,937.043 ↑ 1.1 20 814,597

Seq Scan on pult pp (cost=0.00..13.11 rows=21 width=4) (actual time=0.008..0.119 rows=20 loops=814,597)

  • Filter: (((cascade_id <> ce_4.own_pult) OR (ce_4.own_pult IS NULL)) AND (id_scope = 1::numeric))
  • Rows Removed by Filter: 187
184. 1,629.194 12,218.955 ↑ 1.0 2 814,597

Hash (cost=8.46..8.46 rows=2 width=5) (actual time=0.015..0.015 rows=2 loops=814,597)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
185. 10,589.761 10,589.761 ↑ 1.0 2 814,597

Index Only Scan using ref_pult_event_status_idx on ref_pult_event rfpe_1 (cost=0.43..8.46 rows=2 width=5) (actual time=0.012..0.013 rows=2 loops=814,597)

  • Index Cond: (id_call = rpe_3.id_call)
  • Heap Fetches: 670120
186. 739.329 4,435.974 ↑ 1.0 1 739,329

Aggregate (cost=8.47..8.48 rows=1 width=0) (actual time=0.006..0.006 rows=1 loops=739,329)

187. 3,696.645 3,696.645 ↑ 1.0 2 739,329

Index Only Scan using ref_pult_event_status_idx on ref_pult_event rfpe_2 (cost=0.43..8.46 rows=2 width=0) (actual time=0.004..0.005 rows=2 loops=739,329)

  • Index Cond: (id_call = rpe_3.id_call)
  • Heap Fetches: 549416
188.          

SubPlan (forSubquery Scan)

189. 950.060 16,151.020 ↑ 1.0 1 950,060

Result (cost=3.11..3.12 rows=1 width=0) (actual time=0.016..0.017 rows=1 loops=950,060)

190.          

Initplan (forResult)

191. 950.060 15,200.960 ↑ 1.0 1 950,060

Limit (cost=0.56..3.11 rows=1 width=8) (actual time=0.015..0.016 rows=1 loops=950,060)

192. 14,250.900 14,250.900 ↑ 4.0 1 950,060

Index Only Scan using call_action_data_idx on call_action ca_3 (cost=0.56..10.78 rows=4 width=8) (actual time=0.015..0.015 rows=1 loops=950,060)

  • Index Cond: ((id_call = "*SELECT* 2_1".id_call) AND (dtime IS NOT NULL))
  • Filter: (id_action = ANY ('{65030,65049,65058}'::numeric[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 159081
193. 18.146 145.168 ↑ 1.0 1 18,146

Result (cost=3.11..3.12 rows=1 width=0) (actual time=0.008..0.008 rows=1 loops=18,146)

194.          

Initplan (forResult)

195. 18.146 127.022 ↓ 0.0 0 18,146

Limit (cost=0.56..3.11 rows=1 width=8) (actual time=0.007..0.007 rows=0 loops=18,146)

196. 108.876 108.876 ↓ 0.0 0 18,146

Index Only Scan using call_action_data_idx on call_action ca_4 (cost=0.56..10.78 rows=4 width=8) (actual time=0.006..0.006 rows=0 loops=18,146)

  • Index Cond: ((id_call = "*SELECT* 2_1".id_call) AND (dtime IS NOT NULL))
  • Filter: (id_action = ANY ('{65030,65049,65058}'::numeric[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 15989
197. 948.929 7,591.432 ↑ 1.0 1 948,929

Result (cost=3.11..3.12 rows=1 width=0) (actual time=0.008..0.008 rows=1 loops=948,929)

198.          

Initplan (forResult)

199. 948.929 6,642.503 ↑ 1.0 1 948,929

Limit (cost=0.56..3.11 rows=1 width=8) (actual time=0.007..0.007 rows=1 loops=948,929)

200. 5,693.574 5,693.574 ↑ 4.0 1 948,929

Index Only Scan using call_action_data_idx on call_action ca_5 (cost=0.56..10.78 rows=4 width=8) (actual time=0.006..0.006 rows=1 loops=948,929)

  • Index Cond: ((id_call = "*SELECT* 2_1".id_call) AND (dtime IS NOT NULL))
  • Filter: (id_action = ANY ('{65030,65049,65058}'::numeric[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 156658
201. 0.000 3,300.205 ↑ 18.5 14 1

Subquery Scan on *SELECT* 3_1 (cost=18,639.96..16,270,560.89 rows=259 width=97) (actual time=3,207.811..3,300.205 rows=14 loops=1)

  • Filter: ((((SubPlan 7) >= '2019-06-04 07:40:18'::timestamp without time zone) AND ((SubPlan 9) <= '2019-06-05 07:40:18'::timestamp without time zone)) OR (((SubPlan 11) IS NULL) AND ("*SELECT* 3_1".reg_time >= '2019-06-04 07:40:18'::timestamp without time zone) AND ("*SELECT* 3_1".reg_time <= '2019-06-05 07:40:18'::timestamp without time zone)))
  • Rows Removed by Filter: 24211
202. 1,161.204 2,755.082 ↓ 10.4 24,225 1

Bitmap Heap Scan on call_event ce_5 (cost=18,639.96..16,248,628.37 rows=2,335 width=20) (actual time=133.916..2,755.082 rows=24,225 loops=1)

  • Recheck Cond: (own_pult IS NULL)
  • Rows Removed by Index Recheck: 601115
  • Filter: (((id_src_type IS NULL) OR (id_src_type <> 8::numeric)) AND (wrong_call = 0::numeric) AND ((SubPlan 24) = 0) AND ((SubPlan 23) <> 4::numeric))
  • Rows Removed by Filter: 811119
203. 112.789 112.789 ↓ 1.0 844,130 1

Bitmap Index Scan on call_event_idx16 (cost=0.00..18,639.38 rows=835,060 width=0) (actual time=112.789..112.789 rows=844,130 loops=1)

  • Index Cond: (own_pult IS NULL)
204.          

SubPlan (forBitmap Heap Scan)

205. 24.225 169.575 ↑ 1.0 1 24,225

Result (cost=8.44..8.45 rows=1 width=0) (actual time=0.007..0.007 rows=1 loops=24,225)

206.          

Initplan (forResult)

207. 24.225 145.350 ↓ 0.0 0 24,225

Limit (cost=0.42..8.44 rows=1 width=8) (actual time=0.006..0.006 rows=0 loops=24,225)

208. 121.125 121.125 ↓ 0.0 0 24,225

Index Only Scan using call_tech_send_call_idx on call_tech ct_4 (cost=0.42..8.44 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=24,225)

  • Index Cond: ((id_call = ce_5.id) AND (send_time IS NOT NULL))
  • Heap Fetches: 0
209. 24.225 145.350 ↑ 1.0 1 24,225

Result (cost=8.44..8.45 rows=1 width=0) (actual time=0.006..0.006 rows=1 loops=24,225)

210.          

Initplan (forResult)

211. 0.000 121.125 ↓ 0.0 0 24,225

Limit (cost=0.42..8.44 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=24,225)

212. 121.125 121.125 ↓ 0.0 0 24,225

Index Only Scan using call_tech_atplace_call_idx on call_tech ct_5 (cost=0.42..8.44 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=24,225)

  • Index Cond: ((id_call = ce_5.id) AND (at_place_time IS NOT NULL))
  • Heap Fetches: 0
213. 81.668 653.344 ↑ 1.0 1 81,668

Aggregate (cost=8.47..8.48 rows=1 width=0) (actual time=0.008..0.008 rows=1 loops=81,668)

214. 571.676 571.676 ↑ 2.0 1 81,668

Index Only Scan using ref_pult_event_status_idx on ref_pult_event (cost=0.43..8.46 rows=2 width=0) (actual time=0.006..0.007 rows=1 loops=81,668)

  • Index Cond: (id_call = ce_5.id)
  • Heap Fetches: 45478
215. 287.703 512.820 ↑ 1.0 1 25,641

Hash Join (cost=8.30..10.82 rows=1 width=5) (actual time=0.016..0.020 rows=1 loops=25,641)

  • Hash Cond: (et.id = r.event_type_id)
216. 96.912 96.912 ↑ 1.0 37 24,228

Seq Scan on event_type et (cost=0.00..2.37 rows=37 width=10) (actual time=0.001..0.004 rows=37 loops=24,228)

217. 51.282 128.205 ↑ 1.0 1 25,641

Hash (cost=8.29..8.29 rows=1 width=5) (actual time=0.005..0.005 rows=1 loops=25,641)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
218. 76.923 76.923 ↑ 1.0 1 25,641

Index Scan using rank_sys_c0042610 on rank r (cost=0.27..8.29 rows=1 width=5) (actual time=0.003..0.003 rows=1 loops=25,641)

  • Index Cond: (ce_5.id_rank = id)
219.          

SubPlan (forSubquery Scan)

220. 950.060 16,151.020 ↑ 1.0 1 950,060

Result (cost=3.11..3.12 rows=1 width=0) (actual time=0.016..0.017 rows=1 loops=950,060)

221.          

Initplan (forResult)

222. 950.060 15,200.960 ↑ 1.0 1 950,060

Limit (cost=0.56..3.11 rows=1 width=8) (actual time=0.015..0.016 rows=1 loops=950,060)

223. 14,250.900 14,250.900 ↑ 4.0 1 950,060

Index Only Scan using call_action_data_idx on call_action ca_3 (cost=0.56..10.78 rows=4 width=8) (actual time=0.015..0.015 rows=1 loops=950,060)

  • Index Cond: ((id_call = "*SELECT* 3_1".id_call) AND (dtime IS NOT NULL))
  • Filter: (id_action = ANY ('{65030,65049,65058}'::numeric[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 159081
224. 18.146 145.168 ↑ 1.0 1 18,146

Result (cost=3.11..3.12 rows=1 width=0) (actual time=0.008..0.008 rows=1 loops=18,146)

225.          

Initplan (forResult)

226. 18.146 127.022 ↓ 0.0 0 18,146

Limit (cost=0.56..3.11 rows=1 width=8) (actual time=0.007..0.007 rows=0 loops=18,146)

227. 108.876 108.876 ↓ 0.0 0 18,146

Index Only Scan using call_action_data_idx on call_action ca_4 (cost=0.56..10.78 rows=4 width=8) (actual time=0.006..0.006 rows=0 loops=18,146)

  • Index Cond: ((id_call = "*SELECT* 3_1".id_call) AND (dtime IS NOT NULL))
  • Filter: (id_action = ANY ('{65030,65049,65058}'::numeric[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 15989
228. 948.929 7,591.432 ↑ 1.0 1 948,929

Result (cost=3.11..3.12 rows=1 width=0) (actual time=0.008..0.008 rows=1 loops=948,929)

229.          

Initplan (forResult)

230. 948.929 6,642.503 ↑ 1.0 1 948,929

Limit (cost=0.56..3.11 rows=1 width=8) (actual time=0.007..0.007 rows=1 loops=948,929)

231. 5,693.574 5,693.574 ↑ 4.0 1 948,929

Index Only Scan using call_action_data_idx on call_action ca_5 (cost=0.56..10.78 rows=4 width=8) (actual time=0.006..0.006 rows=1 loops=948,929)

  • Index Cond: ((id_call = "*SELECT* 3_1".id_call) AND (dtime IS NOT NULL))
  • Filter: (id_action = ANY ('{65030,65049,65058}'::numeric[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 156658
232.          

SubPlan (forResult)

233. 1.133 12.463 ↑ 1.0 1 1,133

Result (cost=3.11..3.12 rows=1 width=0) (actual time=0.011..0.011 rows=1 loops=1,133)

234.          

Initplan (forResult)

235. 2.266 11.330 ↑ 1.0 1 1,133

Limit (cost=0.56..3.11 rows=1 width=8) (actual time=0.010..0.010 rows=1 loops=1,133)

236. 9.064 9.064 ↑ 4.0 1 1,133

Index Only Scan using call_action_data_idx on call_action ca (cost=0.56..10.78 rows=4 width=8) (actual time=0.008..0.008 rows=1 loops=1,133)

  • Index Cond: ((id_call = "*SELECT* 1_1".id_call) AND (dtime IS NOT NULL))
  • Filter: (id_action = ANY ('{65030,65049,65058}'::numeric[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 2426
237. 2.266 118.965 ↑ 1.0 1 1,133

Aggregate (cost=167.31..167.32 rows=1 width=8) (actual time=0.105..0.105 rows=1 loops=1,133)

238. 7.706 116.699 ↑ 1.0 1 1,133

Nested Loop (cost=0.72..167.31 rows=1 width=8) (actual time=0.089..0.103 rows=1 loops=1,133)

239. 28.325 28.325 ↑ 2.0 10 1,133

Index Scan using call_action_idx on call_action ca_1 (cost=0.43..8.86 rows=20 width=14) (actual time=0.017..0.025 rows=10 loops=1,133)

  • Index Cond: (id_call = "*SELECT* 1_1".id_call)
240. 80.668 80.668 ↓ 0.0 0 11,524

Index Scan using standart_phrases_sys_c0042494 on standart_phrases st (cost=0.29..7.91 rows=1 width=6) (actual time=0.007..0.007 rows=0 loops=11,524)

  • Index Cond: (id = ca_1.id_action)
  • Filter: (upper((caption)::text) ~~ 'ПРИЁМ ВЫЗОВА%'::text)
  • Rows Removed by Filter: 1
241. 1.133 13.596 ↑ 1.0 1 1,133

Result (cost=3.11..3.12 rows=1 width=0) (actual time=0.012..0.012 rows=1 loops=1,133)

242.          

Initplan (forResult)

243. 1.133 12.463 ↑ 1.0 1 1,133

Limit (cost=0.56..3.11 rows=1 width=8) (actual time=0.011..0.011 rows=1 loops=1,133)

244. 11.330 11.330 ↑ 4.0 1 1,133

Index Only Scan using call_action_data_idx on call_action ca_2 (cost=0.56..10.78 rows=4 width=8) (actual time=0.010..0.010 rows=1 loops=1,133)

  • Index Cond: ((id_call = "*SELECT* 1_1".id_call) AND (dtime IS NOT NULL))
  • Filter: (id_action = ANY ('{65030,65049,65058}'::numeric[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 2426
245. 15.030 364,582.776 ↑ 1.7 1,152 1

Nested Loop (cost=0.00..7,630.14 rows=1,982 width=126) (actual time=364,561.862..364,582.776 rows=1,152 loops=1)

  • Join Filter: (((pult.cascade_id = stat.own_pult) AND (stat.own_pult IS NOT NULL)) OR ((pult.id = 0::numeric) AND (stat.own_pult IS NULL)))
  • Rows Removed by Join Filter: 37370
246. 364,564.244 364,564.244 ↑ 15.4 1,751 1

CTE Scan on stat (cost=0.00..539.22 rows=26,961 width=92) (actual time=364,561.706..364,564.244 rows=1,751 loops=1)

247. 3.318 3.502 ↓ 1.5 22 1,751

Materialize (cost=0.00..13.70 rows=15 width=54) (actual time=0.000..0.002 rows=22 loops=1,751)

248. 0.184 0.184 ↓ 1.5 22 1

Seq Scan on pult (cost=0.00..13.62 rows=15 width=54) (actual time=0.032..0.184 rows=22 loops=1)

  • Filter: ((deleted <> 1::numeric) AND ((id_scope = 1::numeric) OR (id = 0::numeric)))
  • Rows Removed by Filter: 185
249.          

SubPlan (forHashAggregate)

250. 0.660 16.654 ↑ 1.0 1 22

Aggregate (cost=674.36..674.37 rows=1 width=20) (actual time=0.757..0.757 rows=1 loops=22)

251. 15.994 15.994 ↑ 2.6 52 22

CTE Scan on stat stat_1 (cost=0.00..674.03 rows=135 width=20) (actual time=0.104..0.727 rows=52 loops=22)

  • Filter: (((pult.cascade_id = own_pult) AND (own_pult IS NOT NULL)) OR ((pult.id = 0::numeric) AND (own_pult IS NULL)))
  • Rows Removed by Filter: 1699
252. 0.330 14.762 ↑ 1.0 1 22

Aggregate (cost=741.43..741.44 rows=1 width=20) (actual time=0.671..0.671 rows=1 loops=22)

253. 14.432 14.432 ↓ 28.0 28 22

CTE Scan on stat stat_2 (cost=0.00..741.43 rows=1 width=20) (actual time=0.155..0.656 rows=28 loops=22)

  • Filter: ((id_scope = 1::numeric) AND (((pult.cascade_id = own_pult) AND (own_pult IS NOT NULL)) OR ((pult.id = 0::numeric) AND (own_pult IS NULL))))
  • Rows Removed by Filter: 1723
254. 0.660 571.626 ↑ 1.0 1 22

Aggregate (cost=23,625,317.68..23,625,317.69 rows=1 width=20) (actual time=25.983..25.983 rows=1 loops=22)

255. 34.383 570.966 ↓ 52.0 52 22

CTE Scan on stat s (cost=0.00..23,625,317.68 rows=1 width=20) (actual time=0.669..25.953 rows=52 loops=22)

  • Filter: ((status = ANY ('{3,10}'::numeric[])) AND (service_status = ANY ('{3,10}'::numeric[])) AND (((pult.cascade_id = own_pult) AND (own_pult IS NOT NULL)) OR ((pult.id = 0::numeric) AND (own_pult IS NULL))) AND ((SubPlan 52) = 0))
  • Rows Removed by Filter: 1699
256.          

SubPlan (forCTE Scan)

257. 0.000 536.583 ↑ 1.0 1 1,149

Aggregate (cost=876.24..876.25 rows=1 width=0) (actual time=0.467..0.467 rows=1 loops=1,149)

258. 536.583 536.583 ↓ 0.0 0 1,149

CTE Scan on stat stat_3 (cost=0.00..876.23 rows=1 width=0) (actual time=0.466..0.467 rows=0 loops=1,149)

  • Filter: ((id_call = s.id_call) AND (((pult.cascade_id = own_pult) AND (own_pult IS NOT NULL)) OR ((pult.id = 0::numeric) AND (own_pult IS NULL))) AND ((status <> ALL ('{3,10}'::numeric[])) OR (service_status <> ALL ('{3,10}'::numeric[]))))
  • Rows Removed by Filter: 1751
259. 0.110 16.522 ↑ 1.0 1 22

Aggregate (cost=809.17..809.18 rows=1 width=20) (actual time=0.751..0.751 rows=1 loops=22)

260. 16.412 16.412 ↓ 0.0 0 22

CTE Scan on stat stat_4 (cost=0.00..808.83 rows=135 width=20) (actual time=0.709..0.746 rows=0 loops=22)

  • Filter: ((((pult.cascade_id = own_pult) AND (own_pult IS NOT NULL)) OR ((pult.id = 0::numeric) AND (own_pult IS NULL))) AND ((status <> ALL ('{3,10}'::numeric[])) OR (service_status <> ALL ('{3,10}'::numeric[]))))
  • Rows Removed by Filter: 1751
261. 0.484 102.806 ↑ 1.0 1 22

Aggregate (cost=2,287.12..2,287.14 rows=1 width=3) (actual time=4.673..4.673 rows=1 loops=22)

262. 9.306 102.322 ↓ 45.0 45 22

Nested Loop (cost=607.05..2,287.12 rows=1 width=3) (actual time=0.832..4.651 rows=45 loops=22)

263. 4.872 5.192 ↓ 5.0 998 22

HashAggregate (cost=606.62..608.62 rows=200 width=20) (actual time=0.044..0.236 rows=998 loops=22)

264. 0.320 0.320 ↑ 15.4 1,751 1

CTE Scan on stat stat_5 (cost=0.00..539.22 rows=26,961 width=20) (actual time=0.001..0.320 rows=1,751 loops=1)

265. 87.824 87.824 ↓ 0.0 0 21,956

Index Scan using call_event_sys_c0042567 on call_event (cost=0.43..8.37 rows=1 width=9) (actual time=0.004..0.004 rows=0 loops=21,956)

  • Index Cond: (id = stat_5.id_call)
  • Filter: (((pult.cascade_id = own_pult) AND (own_pult IS NOT NULL)) OR ((pult.id = 0::numeric) AND (own_pult IS NULL)))
  • Rows Removed by Filter: 1
266. 0.066 9.504 ↑ 1.0 1 22

Aggregate (cost=2,357.03..2,357.04 rows=1 width=3) (actual time=0.432..0.432 rows=1 loops=22)

267. 0.792 9.438 ↓ 3.0 3 22

Nested Loop (cost=676.96..2,357.03 rows=1 width=3) (actual time=0.260..0.429 rows=3 loops=22)

268. 0.432 1.166 ↑ 2.4 85 22

HashAggregate (cost=676.53..678.53 rows=200 width=20) (actual time=0.037..0.053 rows=85 loops=22)

269. 0.453 0.734 ↑ 82.2 164 1

Hash Join (cost=1.16..642.83 rows=13,480 width=20) (actual time=0.058..0.734 rows=164 loops=1)

  • Hash Cond: (stat_6.id_scope = "*SELECT* 1_2".id)
270. 0.238 0.238 ↑ 15.4 1,751 1

CTE Scan on stat stat_6 (cost=0.00..539.22 rows=26,961 width=40) (actual time=0.001..0.238 rows=1,751 loops=1)

271. 0.002 0.043 ↑ 1.0 1 1

Hash (cost=1.14..1.14 rows=1 width=5) (actual time=0.043..0.043 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
272. 0.005 0.041 ↑ 1.0 1 1

HashAggregate (cost=1.13..1.14 rows=1 width=5) (actual time=0.041..0.041 rows=1 loops=1)

273. 0.001 0.036 ↑ 1.0 1 1

Append (cost=0.00..1.13 rows=1 width=5) (actual time=0.031..0.036 rows=1 loops=1)

274. 0.003 0.035 ↑ 1.0 1 1

Subquery Scan on *SELECT* 1_2 (cost=0.00..1.13 rows=1 width=5) (actual time=0.030..0.035 rows=1 loops=1)

275. 0.032 0.032 ↑ 1.0 1 1

Seq Scan on pult_scope (cost=0.00..1.12 rows=1 width=5) (actual time=0.028..0.032 rows=1 loops=1)

  • Filter: (upper((caption)::text) = 'СЛУЖБА 01'::text)
  • Rows Removed by Filter: 7
276. 7.480 7.480 ↓ 0.0 0 1,870

Index Scan using call_event_sys_c0042567 on call_event call_event_1 (cost=0.43..8.37 rows=1 width=9) (actual time=0.004..0.004 rows=0 loops=1,870)

  • Index Cond: (id = stat_6.id_call)
  • Filter: (((pult.cascade_id = own_pult) AND (own_pult IS NOT NULL)) OR ((pult.id = 0::numeric) AND (own_pult IS NULL)))
  • Rows Removed by Filter: 1
277. 0.110 14.696 ↑ 1.0 1 22

Aggregate (cost=2,357.03..2,357.04 rows=1 width=3) (actual time=0.668..0.668 rows=1 loops=22)

278. 1.100 14.586 ↓ 6.0 6 22

Nested Loop (cost=676.96..2,357.03 rows=1 width=3) (actual time=0.325..0.663 rows=6 loops=22)

279. 0.675 1.430 ↑ 1.5 137 22

HashAggregate (cost=676.53..678.53 rows=200 width=20) (actual time=0.040..0.065 rows=137 loops=22)

280. 0.506 0.755 ↑ 49.4 273 1

Hash Join (cost=1.16..642.83 rows=13,480 width=20) (actual time=0.038..0.755 rows=273 loops=1)

  • Hash Cond: (stat_7.id_scope = "*SELECT* 2_2".id)
281. 0.226 0.226 ↑ 15.4 1,751 1

CTE Scan on stat stat_7 (cost=0.00..539.22 rows=26,961 width=40) (actual time=0.001..0.226 rows=1,751 loops=1)

282. 0.001 0.023 ↑ 1.0 1 1

Hash (cost=1.14..1.14 rows=1 width=5) (actual time=0.023..0.023 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
283. 0.006 0.022 ↑ 1.0 1 1

HashAggregate (cost=1.13..1.14 rows=1 width=5) (actual time=0.022..0.022 rows=1 loops=1)

284. 0.001 0.016 ↑ 1.0 1 1

Append (cost=0.00..1.13 rows=1 width=5) (actual time=0.013..0.016 rows=1 loops=1)

285. 0.001 0.015 ↑ 1.0 1 1

Subquery Scan on *SELECT* 2_2 (cost=0.00..1.13 rows=1 width=5) (actual time=0.012..0.015 rows=1 loops=1)

286. 0.014 0.014 ↑ 1.0 1 1

Seq Scan on pult_scope pult_scope_1 (cost=0.00..1.12 rows=1 width=5) (actual time=0.011..0.014 rows=1 loops=1)

  • Filter: (upper((caption)::text) = 'СЛУЖБА 02'::text)
  • Rows Removed by Filter: 7
287. 12.056 12.056 ↓ 0.0 0 3,014

Index Scan using call_event_sys_c0042567 on call_event call_event_2 (cost=0.43..8.37 rows=1 width=9) (actual time=0.004..0.004 rows=0 loops=3,014)

  • Index Cond: (id = stat_7.id_call)
  • Filter: (((pult.cascade_id = own_pult) AND (own_pult IS NOT NULL)) OR ((pult.id = 0::numeric) AND (own_pult IS NULL)))
  • Rows Removed by Filter: 1
288. 0.176 34.012 ↑ 1.0 1 22

Aggregate (cost=2,357.03..2,357.04 rows=1 width=3) (actual time=1.546..1.546 rows=1 loops=22)

289. 2.970 33.836 ↓ 15.0 15 22

Nested Loop (cost=676.96..2,357.03 rows=1 width=3) (actual time=0.592..1.538 rows=15 loops=22)

290. 1.605 2.530 ↓ 1.6 322 22

HashAggregate (cost=676.53..678.53 rows=200 width=20) (actual time=0.053..0.115 rows=322 loops=22)

291. 0.626 0.925 ↑ 20.9 646 1

Hash Join (cost=1.16..642.83 rows=13,480 width=20) (actual time=0.045..0.925 rows=646 loops=1)

  • Hash Cond: (stat_8.id_scope = "*SELECT* 3_2".id)
292. 0.270 0.270 ↑ 15.4 1,751 1

CTE Scan on stat stat_8 (cost=0.00..539.22 rows=26,961 width=40) (actual time=0.000..0.270 rows=1,751 loops=1)

293. 0.004 0.029 ↑ 1.0 1 1

Hash (cost=1.14..1.14 rows=1 width=5) (actual time=0.029..0.029 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
294. 0.006 0.025 ↑ 1.0 1 1

HashAggregate (cost=1.13..1.14 rows=1 width=5) (actual time=0.025..0.025 rows=1 loops=1)

295. 0.001 0.019 ↑ 1.0 1 1

Append (cost=0.00..1.13 rows=1 width=5) (actual time=0.016..0.019 rows=1 loops=1)

296. 0.001 0.018 ↑ 1.0 1 1

Subquery Scan on *SELECT* 3_2 (cost=0.00..1.13 rows=1 width=5) (actual time=0.015..0.018 rows=1 loops=1)

297. 0.017 0.017 ↑ 1.0 1 1

Seq Scan on pult_scope pult_scope_2 (cost=0.00..1.12 rows=1 width=5) (actual time=0.014..0.017 rows=1 loops=1)

  • Filter: (upper((caption)::text) = 'СЛУЖБА 03'::text)
  • Rows Removed by Filter: 7
298. 28.336 28.336 ↓ 0.0 0 7,084

Index Scan using call_event_sys_c0042567 on call_event call_event_3 (cost=0.43..8.37 rows=1 width=9) (actual time=0.004..0.004 rows=0 loops=7,084)

  • Index Cond: (id = stat_8.id_call)
  • Filter: (((pult.cascade_id = own_pult) AND (own_pult IS NOT NULL)) OR ((pult.id = 0::numeric) AND (own_pult IS NULL)))
  • Rows Removed by Filter: 1