explain.depesz.com

PostgreSQL's explain analyze made readable

Result: etHW

Settings
# exclusive inclusive rows x rows loops node
1. 0.233 17,095.559 ↑ 5,111.0 1,328 1

Append (cost=14,449.01..1,572,091,808.40 rows=6,787,461 width=632) (actual time=4,165.134..17,095.559 rows=1,328 loops=1)

2. 1.050 17,088.161 ↑ 5,841.2 1,162 1

Subquery Scan on *SELECT* 1 (cost=14,449.01..1,572,091,784.00 rows=6,787,460 width=632) (actual time=4,165.133..17,088.161 rows=1,162 loops=1)

3. 52.103 17,087.111 ↑ 5,841.2 1,162 1

Hash Left Join (cost=14,449.01..1,572,023,909.40 rows=6,787,460 width=632) (actual time=4,165.130..17,087.111 rows=1,162 loops=1)

  • Hash Cond: (call_event.id_object = o.id)
4. 2.945 16,296.833 ↑ 5,841.2 1,162 1

Hash Left Join (cost=13,811.74..1,152,429.19 rows=6,787,460 width=632) (actual time=4,153.705..16,296.833 rows=1,162 loops=1)

  • Hash Cond: (call_event.id_full_adress = full_adress.id)
5. 60.227 16,191.507 ↑ 5,841.2 1,162 1

Merge Left Join (cost=9,837.46..1,072,822.24 rows=6,787,460 width=580) (actual time=4,051.293..16,191.507 rows=1,162 loops=1)

  • Merge Cond: (call_event.id = ac.id_call)
6. 5.992 15,844.961 ↑ 5,841.2 1,162 1

Merge Left Join (cost=9,724.82..1,043,975.66 rows=6,787,460 width=537) (actual time=3,736.163..15,844.961 rows=1,162 loops=1)

  • Merge Cond: (call_event.id = apa.id)
7. 15,657.506 15,832.235 ↑ 5,841.2 1,162 1

Index Scan using call_event_sys_c0042567 on call_event (cost=9,724.54..1,023,339.00 rows=6,787,460 width=485) (actual time=3,736.115..15,832.235 rows=1,162 loops=1)

  • Filter: ((is_active = 1::numeric) OR (hashed SubPlan 19))
  • Rows Removed by Filter: 13594682
8.          

SubPlan (forIndex Scan)

9. 174.729 174.729 ↓ 16.0 16 1

Seq Scan on ref_pult_event (cost=0.00..9,724.10 rows=1 width=6) (actual time=118.221..174.729 rows=16 loops=1)

  • Filter: (status <> ALL ('{3,10}'::numeric[]))
  • Rows Removed by Filter: 315036
10. 6.734 6.734 ↑ 1.0 15,738 1

Index Scan using arm03_patient_assistance_sys_c0055818 on arm03_patient_assistance apa (cost=0.29..5,861.47 rows=15,945 width=59) (actual time=0.040..6.734 rows=15,738 loops=1)

11. 286.319 286.319 ↑ 1.0 184,355 1

Index Scan using arm03_call_pk on arm03_call ac (cost=0.42..11,105.04 rows=186,851 width=49) (actual time=0.036..286.319 rows=184,355 loops=1)

12. 3.929 102.381 ↓ 1.0 6,518 1

Hash (cost=3,892.82..3,892.82 rows=6,517 width=57) (actual time=102.381..102.381 rows=6,518 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 567kB
13. 5.905 98.452 ↓ 1.0 6,518 1

Hash Left Join (cost=2,973.09..3,892.82 rows=6,517 width=57) (actual time=67.960..98.452 rows=6,518 loops=1)

  • Hash Cond: (base_adress.id_street = street.id)
14. 4.964 91.118 ↓ 1.0 6,518 1

Hash Left Join (cost=2,910.41..3,732.38 rows=6,517 width=39) (actual time=66.520..91.118 rows=6,518 loops=1)

  • Hash Cond: (base_adress.id_city = city.id)
15. 17.494 85.924 ↓ 1.0 6,518 1

Hash Left Join (cost=2,899.66..3,632.03 rows=6,517 width=24) (actual time=66.272..85.924 rows=6,518 loops=1)

  • Hash Cond: (full_adress.id_base_adress = base_adress.id)
16. 2.228 2.228 ↓ 1.0 6,518 1

Seq Scan on full_adress (cost=0.00..104.17 rows=6,517 width=11) (actual time=0.016..2.228 rows=6,518 loops=1)

17. 36.324 66.202 ↓ 1.0 75,292 1

Hash (cost=1,516.74..1,516.74 rows=75,274 width=19) (actual time=66.202..66.202 rows=75,292 loops=1)

  • Buckets: 8192 Batches: 2 Memory Usage: 1923kB
18. 29.878 29.878 ↓ 1.0 75,292 1

Seq Scan on base_adress (cost=0.00..1,516.74 rows=75,274 width=19) (actual time=0.012..29.878 rows=75,292 loops=1)

19. 0.123 0.230 ↑ 1.0 344 1

Hash (cost=6.44..6.44 rows=344 width=25) (actual time=0.230..0.230 rows=344 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 20kB
20. 0.107 0.107 ↑ 1.0 344 1

Seq Scan on city (cost=0.00..6.44 rows=344 width=25) (actual time=0.009..0.107 rows=344 loops=1)

21. 0.821 1.429 ↓ 1.0 2,076 1

Hash (cost=36.75..36.75 rows=2,075 width=28) (actual time=1.429..1.429 rows=2,076 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 124kB
22. 0.608 0.608 ↓ 1.0 2,076 1

Seq Scan on street (cost=0.00..36.75 rows=2,075 width=28) (actual time=0.012..0.608 rows=2,076 loops=1)

23. 1.027 8.439 ↑ 1.0 2,431 1

Hash (cost=606.88..606.88 rows=2,431 width=5) (actual time=8.439..8.439 rows=2,431 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 88kB
24. 7.412 7.412 ↑ 1.0 2,431 1

Seq Scan on objects o (cost=0.00..606.88 rows=2,431 width=5) (actual time=0.028..7.412 rows=2,431 loops=1)

  • Filter: (deleted <> 1::numeric)
  • Rows Removed by Filter: 359
25.          

SubPlan (forHash Left Join)

26. 1.162 9.296 ↓ 0.0 0 1,162

Limit (cost=0.56..8.58 rows=1 width=6) (actual time=0.008..0.008 rows=0 loops=1,162)

27. 8.134 8.134 ↓ 0.0 0 1,162

Index Scan using history_events_idx_5 on history_events history_events_1 (cost=0.56..8.58 rows=1 width=6) (actual time=0.007..0.007 rows=0 loops=1,162)

  • Index Cond: (id_call = call_event.id)
28. 1.162 15.106 ↓ 0.0 0 1,162

Subquery Scan on rcv_time1 (cost=8.31..8.33 rows=1 width=8) (actual time=0.013..0.013 rows=0 loops=1,162)

29. 1.162 13.944 ↓ 0.0 0 1,162

Limit (cost=8.31..8.32 rows=1 width=20) (actual time=0.012..0.012 rows=0 loops=1,162)

30. 5.810 12.782 ↓ 0.0 0 1,162

Sort (cost=8.31..8.32 rows=1 width=20) (actual time=0.011..0.011 rows=0 loops=1,162)

  • Sort Key: call_tech.id
  • Sort Method: quicksort Memory: 25kB
31. 6.972 6.972 ↑ 1.0 1 1,162

Index Scan using call_tech_idx on call_tech (cost=0.29..8.30 rows=1 width=20) (actual time=0.004..0.006 rows=1 loops=1,162)

  • Index Cond: (id_call = call_event.id)
32. 1.162 4.648 ↑ 1.0 1 1,162

Aggregate (cost=8.31..8.32 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=1,162)

33. 3.486 3.486 ↑ 1.0 1 1,162

Index Scan using call_tech_idx on call_tech call_tech_1 (cost=0.29..8.30 rows=1 width=8) (actual time=0.002..0.003 rows=1 loops=1,162)

  • Index Cond: (id_call = call_event.id)
  • Filter: (at_place_time IS NOT NULL)
  • Rows Removed by Filter: 0
34. 1.162 4.648 ↓ 0.0 0 1,162

Limit (cost=0.56..8.58 rows=1 width=5) (actual time=0.004..0.004 rows=0 loops=1,162)

35. 3.486 3.486 ↓ 0.0 0 1,162

Index Scan using history_events_idx_5 on history_events history_events_2 (cost=0.56..8.58 rows=1 width=5) (actual time=0.003..0.003 rows=0 loops=1,162)

  • Index Cond: (id_call = call_event.id)
36. 1.162 32.536 ↓ 0.0 0 1,162

Limit (cost=0.29..16.65 rows=1 width=6) (actual time=0.028..0.028 rows=0 loops=1,162)

37. 4.886 31.374 ↓ 0.0 0 1,162

Index Only Scan using call_tech_idx on call_tech call_tech_2 (cost=0.29..16.65 rows=1 width=6) (actual time=0.027..0.027 rows=0 loops=1,162)

  • Index Cond: (id_call = call_event.id)
  • Heap Fetches: 299
38.          

SubPlan (forIndex Only Scan)

39. 23.478 26.488 ↑ 1.0 1 301

Aggregate (cost=8.33..8.34 rows=1 width=83) (actual time=0.088..0.088 rows=1 loops=301)

40. 3.010 3.010 ↓ 4.0 4 301

Index Scan using call_tech_idx on call_tech ct (cost=0.29..8.31 rows=1 width=83) (actual time=0.004..0.010 rows=4 loops=301)

  • Index Cond: (id_call = call_tech_2.id_call)
  • Filter: (tech_deleted = 0::numeric)
  • Rows Removed by Filter: 0
41. 10.818 33.698 ↑ 1.0 1 1,162

Index Only Scan using arm03_call_pk on arm03_call (cost=8.87..16.89 rows=1 width=0) (actual time=0.029..0.029 rows=1 loops=1,162)

  • Index Cond: (id_call = call_event.id)
  • Heap Fetches: 1109
42.          

Initplan (forIndex Only Scan)

43. 19.448 22.880 ↑ 1.0 1 1,144

Aggregate (cost=8.44..8.45 rows=1 width=64) (actual time=0.020..0.020 rows=1 loops=1,144)

44. 3.432 3.432 ↑ 1.0 1 1,144

Index Scan using arm03_call_pk on arm03_call a_data (cost=0.42..8.44 rows=1 width=64) (actual time=0.003..0.003 rows=1 loops=1,144)

  • Index Cond: (id_call = call_event.id)
45. 1.162 12.782 ↑ 1.0 1 1,162

Limit (cost=0.00..1.58 rows=1 width=5) (actual time=0.011..0.011 rows=1 loops=1,162)

46. 11.620 11.620 ↑ 1.0 1 1,162

Seq Scan on event_type (cost=0.00..1.58 rows=1 width=5) (actual time=0.010..0.010 rows=1 loops=1,162)

  • Filter: (id = call_event.id_event_type)
  • Rows Removed by Filter: 45
47. 1.162 3.486 ↓ 0.0 0 1,162

Limit (cost=0.29..24.51 rows=1 width=20) (actual time=0.003..0.003 rows=0 loops=1,162)

48. 1.162 2.324 ↓ 0.0 0 1,162

Nested Loop Semi Join (cost=0.29..24.51 rows=1 width=20) (actual time=0.002..0.002 rows=0 loops=1,162)

49. 1.162 1.162 ↓ 0.0 0 1,162

Index Only Scan using call_result_value_sys_c0042574 on call_result_value (cost=0.14..8.16 rows=1 width=40) (actual time=0.001..0.001 rows=0 loops=1,162)

  • Index Cond: (id_call = call_event.id)
  • Heap Fetches: 0
50. 0.000 0.000 ↓ 0.0 0

Index Only Scan using event_list_field_set_idx on event_list_field_set (cost=0.14..8.16 rows=1 width=20) (never executed)

  • Index Cond: (id_adv_field = call_result_value.id_field)
  • Heap Fetches: 0
51.          

SubPlan (forNested Loop Semi Join)

52. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.16..8.17 rows=1 width=536) (never executed)

53. 0.000 0.000 ↓ 0.0 0

Index Scan using call_result_value_sys_c0042574 on call_result_value crv (cost=0.14..8.16 rows=1 width=536) (never executed)

  • Index Cond: (id_call = call_result_value.id_call)
54. 0.000 3.486 ↓ 0.0 0 1,162

Limit (cost=0.29..8.31 rows=1 width=11) (actual time=0.003..0.003 rows=0 loops=1,162)

55. 3.486 3.486 ↓ 0.0 0 1,162

Index Scan using ref_call_event_sound_idx on ref_call_event_sound (cost=0.29..8.31 rows=1 width=11) (actual time=0.003..0.003 rows=0 loops=1,162)

  • Index Cond: (id_call_event = call_event.id)
  • Filter: (is_out <> 1::numeric)
56. 1.162 5.810 ↓ 0.0 0 1,162

Limit (cost=0.42..8.44 rows=1 width=6) (actual time=0.005..0.005 rows=0 loops=1,162)

57. 4.648 4.648 ↓ 0.0 0 1,162

Index Only Scan using linked_event_sys_c0042583 on linked_event (cost=0.42..8.44 rows=1 width=6) (actual time=0.004..0.004 rows=0 loops=1,162)

  • Index Cond: (id = call_event.id)
  • Heap Fetches: 2
58. 26.726 85.988 ↑ 1.0 1 1,162

Aggregate (cost=9.69..9.70 rows=1 width=35) (actual time=0.074..0.074 rows=1 loops=1,162)

59. 59.262 59.262 ↑ 3.8 5 1,162

Index Scan using linked_event_call_idx on linked_event l_event (cost=0.42..9.64 rows=19 width=35) (actual time=0.020..0.051 rows=5 loops=1,162)

  • Index Cond: (id_call = call_event.id)
60. 2.324 4.648 ↑ 1.0 1 1,162

Aggregate (cost=12.65..12.66 rows=1 width=44) (actual time=0.004..0.004 rows=1 loops=1,162)

61. 1.162 2.324 ↓ 0.0 0 1,162

Bitmap Heap Scan on ref_call_staff (cost=4.18..12.64 rows=4 width=44) (actual time=0.002..0.002 rows=0 loops=1,162)

  • Recheck Cond: (id_call = call_event.id)
62. 1.162 1.162 ↓ 0.0 0 1,162

Bitmap Index Scan on ref_call_staff_pk (cost=0.00..4.18 rows=4 width=0) (actual time=0.001..0.001 rows=0 loops=1,162)

  • Index Cond: (id_call = call_event.id)
63. 42.994 65.072 ↑ 1.0 1 1,162

Aggregate (cost=13.22..13.23 rows=1 width=117) (actual time=0.056..0.056 rows=1 loops=1,162)

64. 4.588 22.078 ↑ 3.0 2 1,162

Hash Join (cost=2.96..13.19 rows=6 width=117) (actual time=0.009..0.019 rows=2 loops=1,162)

  • Hash Cond: (call_info.id_oper = user_pult.id_user)
65. 17.430 17.430 ↑ 3.0 2 1,162

Index Scan using call_info_idx on call_info (cost=0.43..10.58 rows=6 width=114) (actual time=0.008..0.015 rows=2 loops=1,162)

  • Index Cond: (id_call = call_event.id)
66. 0.029 0.060 ↓ 1.0 70 1

Hash (cost=1.68..1.68 rows=68 width=8) (actual time=0.060..0.060 rows=70 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
67. 0.031 0.031 ↓ 1.0 70 1

Seq Scan on user_pult (cost=0.00..1.68 rows=68 width=8) (actual time=0.013..0.031 rows=70 loops=1)

68. 5.810 446.208 ↑ 1.0 1 1,162

Limit (cost=75.37..75.38 rows=1 width=109) (actual time=0.384..0.384 rows=1 loops=1,162)

69. 290.500 440.398 ↑ 1.0 1 1,162

Aggregate (cost=75.37..75.38 rows=1 width=109) (actual time=0.379..0.379 rows=1 loops=1,162)

70. 16.690 149.898 ↓ 2.0 16 1,162

Nested Loop (cost=0.71..75.33 rows=8 width=109) (actual time=0.015..0.129 rows=16 loops=1,162)

71. 58.100 58.100 ↓ 2.0 16 1,162

Index Scan using call_action_idx on call_action (cost=0.43..12.83 rows=8 width=59) (actual time=0.010..0.050 rows=16 loops=1,162)

  • Index Cond: (id_call = call_event.id)
  • Filter: (action_deleted = 0::numeric)
72. 75.108 75.108 ↑ 1.0 1 18,777

Index Scan using standart_phrases_sys_c0042494 on standart_phrases (cost=0.28..7.80 rows=1 width=56) (actual time=0.003..0.004 rows=1 loops=18,777)

  • Index Cond: (id = call_action.id_action)
73. 2.324 2.324 ↑ 1.0 1 1,162

Aggregate (cost=10.25..10.26 rows=1 width=0) (actual time=0.002..0.002 rows=1 loops=1,162)

74. 0.000 0.000 ↓ 0.0 0 1,162

Seq Scan on glonass_event_info (cost=0.00..10.25 rows=1 width=0) (actual time=0.000..0.000 rows=0 loops=1,162)

  • Filter: (id_call = call_event.id)
75. 0.415 7.165 ↓ 166.0 166 1

Subquery Scan on *SELECT* 2 (cost=7.63..24.41 rows=1 width=141) (actual time=3.119..7.165 rows=166 loops=1)

76. 0.153 6.750 ↓ 166.0 166 1

Nested Loop Left Join (cost=7.63..24.40 rows=1 width=141) (actual time=3.107..6.750 rows=166 loops=1)

77. 0.175 6.099 ↓ 166.0 166 1

Nested Loop Left Join (cost=7.35..24.09 rows=1 width=123) (actual time=3.084..6.099 rows=166 loops=1)

78. 0.115 5.592 ↓ 166.0 166 1

Nested Loop Left Join (cost=7.20..23.91 rows=1 width=108) (actual time=3.071..5.592 rows=166 loops=1)

79. 0.082 4.647 ↓ 166.0 166 1

Nested Loop Left Join (cost=6.91..22.87 rows=1 width=101) (actual time=3.054..4.647 rows=166 loops=1)

80. 0.039 4.067 ↓ 166.0 166 1

Nested Loop Left Join (cost=6.62..22.47 rows=1 width=100) (actual time=3.035..4.067 rows=166 loops=1)

81. 0.173 3.198 ↓ 166.0 166 1

Hash Right Join (cost=6.34..14.16 rows=1 width=95) (actual time=3.009..3.198 rows=166 loops=1)

  • Hash Cond: (r.id = history_events.id_rank)
82. 0.037 0.037 ↑ 1.0 277 1

Seq Scan on rank r (cost=0.00..6.77 rows=277 width=10) (actual time=0.004..0.037 rows=277 loops=1)

83. 0.043 2.988 ↓ 166.0 166 1

Hash (cost=6.33..6.33 rows=1 width=90) (actual time=2.988..2.988 rows=166 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 20kB
84. 2.945 2.945 ↓ 166.0 166 1

Index Scan using history_events_new_idx_call_i on history_events (cost=0.56..6.33 rows=1 width=90) (actual time=0.037..2.945 rows=166 loops=1)

  • Index Cond: ((is_active = 1::numeric) AND (id_call IS NULL))
85. 0.830 0.830 ↑ 1.0 1 166

Index Scan using objects_sys_c0042470 on objects (cost=0.28..8.30 rows=1 width=10) (actual time=0.004..0.005 rows=1 loops=166)

  • Index Cond: (history_events.id_object = id)
86. 0.498 0.498 ↑ 1.0 1 166

Index Scan using full_adress_sys_c0042551 on full_adress full_adress_1 (cost=0.28..0.38 rows=1 width=11) (actual time=0.003..0.003 rows=1 loops=166)

  • Index Cond: (id = objects.id_full_adress)
87. 0.830 0.830 ↑ 1.0 1 166

Index Scan using base_adress_sys_c0042564 on base_adress base_adress_1 (cost=0.29..1.04 rows=1 width=19) (actual time=0.005..0.005 rows=1 loops=166)

  • Index Cond: (full_adress_1.id_base_adress = id)
88. 0.332 0.332 ↑ 1.0 1 166

Index Scan using city_sys_c0042422 on city city_1 (cost=0.15..0.17 rows=1 width=25) (actual time=0.002..0.002 rows=1 loops=166)

  • Index Cond: (id = base_adress_1.id_city)
89. 0.498 0.498 ↑ 1.0 1 166

Index Scan using street_sys_c0042497 on street street_1 (cost=0.28..0.30 rows=1 width=28) (actual time=0.002..0.003 rows=1 loops=166)

  • Index Cond: (id = base_adress_1.id_street)
Planning time : 10.951 ms
Execution time : 17,096.879 ms