explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oSMh

Settings
# exclusive inclusive rows x rows loops node
1. 3.662 361,500.111 ↑ 1.0 147 1

Sort (cost=1,345,589.30..1,345,589.68 rows=149 width=463) (actual time=361,499.116..361,500.111 rows=147 loops=1)

  • Sort Key: imd.department_cd, cqm.machine_code
  • Sort Method: quicksort Memory: 77kB
2. 4.354 361,496.449 ↑ 1.0 147 1

Hash Left Join (cost=1,345,458.94..1,345,583.93 rows=149 width=463) (actual time=361,480.000..361,496.449 rows=147 loops=1)

  • Hash Cond: (cqm.terminal_id = cqt.id)
3. 4.258 361,479.592 ↑ 1.0 147 1

Nested Loop Left Join (cost=1,345,424.53..1,345,535.18 rows=149 width=459) (actual time=361,467.258..361,479.592 rows=147 loops=1)

4. 2.850 361,471.512 ↑ 1.0 147 1

Merge Left Join (cost=1,345,424.26..1,345,425.36 rows=149 width=449) (actual time=361,467.141..361,471.512 rows=147 loops=1)

  • Merge Cond: (cqm.terminal_id = cqch.terminal_id)
5. 2.481 359,755.189 ↑ 1.0 147 1

Sort (cost=1,340,671.55..1,340,671.92 rows=149 width=441) (actual time=359,754.154..359,755.189 rows=147 loops=1)

  • Sort Key: cqm.terminal_id
  • Sort Method: quicksort Memory: 69kB
6. 1.929 359,752.708 ↑ 1.0 147 1

Merge Left Join (cost=1,340,635.84..1,340,666.17 rows=149 width=441) (actual time=359,713.212..359,752.708 rows=147 loops=1)

  • Merge Cond: (cqm.id = sub1.machine_id)
7. 6.407 357,341.557 ↑ 1.0 147 1

Merge Left Join (cost=1,334,728.27..1,334,739.39 rows=149 width=165) (actual time=357,304.139..357,341.557 rows=147 loops=1)

  • Merge Cond: (cqm.id = m.id)
8. 1.802 28.526 ↑ 1.0 147 1

Sort (cost=123.32..123.69 rows=149 width=133) (actual time=27.606..28.526 rows=147 loops=1)

  • Sort Key: cqm.id
  • Sort Method: quicksort Memory: 63kB
9. 1.619 26.724 ↑ 1.0 147 1

Hash Left Join (cost=84.44..117.94 rows=149 width=133) (actual time=15.476..26.724 rows=147 loops=1)

  • Hash Cond: (((cqm.company_code)::text = (imd.company_cd)::text) AND ((cqm.company_code)::text = (imd.department_set_cd)::text) AND ((cqm.company_code)::text = (imd.department_cd)::text))
10. 1.576 21.672 ↑ 1.0 147 1

Hash Left Join (cost=50.81..82.06 rows=149 width=93) (actual time=12.016..21.672 rows=147 loops=1)

  • Hash Cond: (cqm.model_id = cqmd.id)
11. 4.169 18.712 ↑ 1.0 147 1

Hash Right Join (cost=46.12..75.32 rows=149 width=95) (actual time=10.610..18.712 rows=147 loops=1)

  • Hash Cond: (cqmi.machine_id = cqm.id)
12. 3.967 3.967 ↓ 1.0 661 1

Seq Scan on cq_machines_international cqmi (cost=0.00..25.35 rows=654 width=19) (actual time=0.012..3.967 rows=661 loops=1)

  • Filter: ((language_code)::text = 'ja'::text)
  • Rows Removed by Filter: 661
13. 0.814 10.576 ↑ 1.0 147 1

Hash (cost=44.25..44.25 rows=149 width=84) (actual time=10.576..10.576 rows=147 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
14. 1.549 9.762 ↑ 1.0 147 1

Hash Left Join (cost=17.90..44.25 rows=149 width=84) (actual time=6.762..9.762 rows=147 loops=1)

  • Hash Cond: (cqm.id = mccs.machine_id)
15. 1.486 1.486 ↑ 1.0 147 1

Seq Scan on cq_machines cqm (cost=0.00..25.69 rows=149 width=68) (actual time=0.013..1.486 rows=147 loops=1)

  • Filter: ((operation_status)::text = '1'::text)
  • Rows Removed by Filter: 514
16. 0.272 6.727 ↑ 1.0 50 1

Hash (cost=17.27..17.27 rows=50 width=24) (actual time=6.727..6.727 rows=50 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
17. 0.507 6.455 ↑ 1.0 50 1

Subquery Scan on mccs (cost=16.27..17.27 rows=50 width=24) (actual time=5.693..6.455 rows=50 loops=1)

18. 3.138 5.948 ↑ 1.0 50 1

HashAggregate (cost=16.27..16.77 rows=50 width=15) (actual time=5.682..5.948 rows=50 loops=1)

  • Group Key: mccssub.machine_id
19. 2.810 2.810 ↑ 1.0 501 1

Seq Scan on cq_maintenance_check_current_status mccssub (cost=0.00..10.01 rows=501 width=15) (actual time=0.059..2.810 rows=501 loops=1)

20. 0.222 1.384 ↓ 1.1 40 1

Hash (cost=4.23..4.23 rows=37 width=14) (actual time=1.384..1.384 rows=40 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
21. 0.456 1.162 ↓ 1.1 40 1

Hash Right Join (cost=1.83..4.23 rows=37 width=14) (actual time=0.517..1.162 rows=40 loops=1)

  • Hash Cond: (cqmo.model_id = cqmd.id)
22. 0.268 0.268 ↓ 1.1 40 1

Seq Scan on cq_models_international cqmo (cost=0.00..1.90 rows=36 width=14) (actual time=0.057..0.268 rows=40 loops=1)

  • Filter: ((language_code)::text = 'ja'::text)
  • Rows Removed by Filter: 40
23. 0.219 0.438 ↓ 1.1 40 1

Hash (cost=1.37..1.37 rows=37 width=8) (actual time=0.438..0.438 rows=40 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
24. 0.219 0.219 ↓ 1.1 40 1

Seq Scan on cq_models cqmd (cost=0.00..1.37 rows=37 width=8) (actual time=0.007..0.219 rows=40 loops=1)

25. 1.205 3.433 ↑ 1.0 207 1

Hash (cost=30.01..30.01 rows=207 width=67) (actual time=3.433..3.433 rows=207 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
26. 2.228 2.228 ↑ 1.0 207 1

Seq Scan on imm_department imd (cost=0.00..30.01 rows=207 width=67) (actual time=0.414..2.228 rows=207 loops=1)

  • Filter: (((locale_id)::text = 'ja'::text) AND (start_date <= ('now'::cstring)::date) AND (end_date > ('now'::cstring)::date))
  • Rows Removed by Filter: 48
27. 8.480 357,306.624 ↑ 1.1 661 1

Materialize (cost=1,334,604.95..1,334,612.10 rows=695 width=40) (actual time=357,276.514..357,306.624 rows=661 loops=1)

28. 8.469 357,298.144 ↑ 1.1 661 1

Merge Left Join (cost=1,334,604.95..1,334,610.36 rows=695 width=40) (actual time=357,276.501..357,298.144 rows=661 loops=1)

  • Merge Cond: (m.id = o_his.machine_id)
29. 8.706 353,148.263 ↑ 1.1 661 1

Merge Left Join (cost=1,319,717.06..1,319,720.72 rows=695 width=98) (actual time=353,135.093..353,148.263 rows=661 loops=1)

  • Merge Cond: (m.id = d_his.machine_id)
30. 7.679 25.471 ↑ 1.1 661 1

Sort (cost=99.72..101.46 rows=695 width=18) (actual time=21.369..25.471 rows=661 loops=1)

  • Sort Key: m.id
  • Sort Method: quicksort Memory: 67kB
31. 6.972 17.792 ↑ 1.1 661 1

Hash Right Join (cost=32.64..66.92 rows=695 width=18) (actual time=6.954..17.792 rows=661 loops=1)

  • Hash Cond: (m_loc.machine_id = m.id)
32. 3.903 3.903 ↓ 1.0 661 1

Seq Scan on cq_machines_location m_loc (cost=0.00..25.29 rows=654 width=18) (actual time=0.014..3.903 rows=661 loops=1)

  • Filter: ((language_code)::text = 'ja'::text)
  • Rows Removed by Filter: 656
33. 3.460 6.917 ↑ 1.1 661 1

Hash (cost=23.95..23.95 rows=695 width=8) (actual time=6.917..6.917 rows=661 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 26kB
34. 3.457 3.457 ↑ 1.1 661 1

Seq Scan on cq_machines m (cost=0.00..23.95 rows=695 width=8) (actual time=0.008..3.457 rows=661 loops=1)

35. 0.762 353,114.086 ↓ 4.7 56 1

Sort (cost=1,319,617.34..1,319,617.37 rows=12 width=88) (actual time=353,113.705..353,114.086 rows=56 loops=1)

  • Sort Key: d_his.machine_id
  • Sort Method: quicksort Memory: 33kB
36. 35.889 353,113.324 ↓ 4.7 56 1

Nested Loop (cost=1,316,504.42..1,319,617.12 rows=12 width=88) (actual time=352,988.889..353,113.324 rows=56 loops=1)

37. 33.737 353,049.675 ↓ 4.8 3,470 1

Nested Loop (cost=1,316,504.00..1,319,282.45 rows=723 width=24) (actual time=352,988.731..353,049.675 rows=3,470 loops=1)

38. 2,997.171 352,988.778 ↓ 1.0 56 1

HashAggregate (cost=1,316,503.43..1,316,503.98 rows=55 width=16) (actual time=352,988.496..352,988.778 rows=56 loops=1)

  • Group Key: d_his_1.machine_id
39. 164,437.974 349,991.607 ↓ 1.0 556,813 1

Merge Join (cost=63.25..1,313,740.71 rows=552,544 width=16) (actual time=0.494..349,991.607 rows=556,813 loops=1)

  • Merge Cond: (m_his_1.id = d_his_1.id)
40. 3,709.543 3,709.543 ↓ 1.0 556,813 1

Index Only Scan using cq_movement_history_index01 on cq_movement_history m_his_1 (cost=0.43..73,286.42 rows=552,544 width=8) (actual time=0.037..3,709.543 rows=556,813 loops=1)

  • Index Cond: (language_code = 'ja'::text)
  • Heap Fetches: 556813
41. 181,844.090 181,844.090 ↑ 1.0 32,102,131 1

Index Scan using pk_cq_operation_data_history on cq_operation_data_history d_his_1 (cost=0.44..1,174,329.55 rows=32,244,928 width=24) (actual time=0.018..181,844.090 rows=32,102,131 loops=1)

42. 27.160 27.160 ↓ 4.8 62 56

Index Scan using cq_operation_data_history_index02 on cq_operation_data_history d_his (cost=0.56..50.38 rows=13 width=24) (actual time=0.120..0.485 rows=62 loops=56)

  • Index Cond: ((machine_id = d_his_1.machine_id) AND (acquisition_time = (max(d_his_1.acquisition_time))))
43. 27.760 27.760 ↓ 0.0 0 3,470

Index Scan using cq_movement_history_index01 on cq_movement_history m_his (cost=0.43..0.45 rows=1 width=80) (actual time=0.008..0.008 rows=0 loops=3,470)

  • Index Cond: ((id = d_his.id) AND ((language_code)::text = 'ja'::text))
44. 0.083 4,141.412 ↓ 4.0 4 1

Sort (cost=14,887.89..14,887.90 rows=1 width=84) (actual time=4,141.389..4,141.412 rows=4 loops=1)

  • Sort Key: o_his.machine_id
  • Sort Method: quicksort Memory: 25kB
45. 0.131 4,141.329 ↓ 4.0 4 1

Nested Loop (cost=14,065.44..14,887.88 rows=1 width=84) (actual time=4,141.065..4,141.329 rows=4 loops=1)

  • Join Filter: ((min((eve_1.event_code)::text)) = (eve.event_code)::text)
46. 0.107 4,141.066 ↑ 3.0 4 1

Hash Join (cost=14,065.15..14,883.99 rows=12 width=124) (actual time=4,140.964..4,141.066 rows=4 loops=1)

  • Hash Cond: ((o_his_1.machine_id = o_his.machine_id) AND (o_his_1.acquisition_time = o_his.acquisition_time))
47. 0.120 2,644.940 ↑ 2,924.0 4 1

HashAggregate (cost=9,079.09..9,196.05 rows=11,696 width=25) (actual time=2,644.890..2,644.940 rows=4 loops=1)

  • Group Key: o_his_1.machine_id, o_his_1.acquisition_time
48. 0.097 2,644.820 ↑ 2,924.0 4 1

Hash Join (cost=7,234.62..8,991.37 rows=11,696 width=25) (actual time=2,313.254..2,644.820 rows=4 loops=1)

  • Hash Cond: (o_his_1.event_id = eve_1.id)
49. 96.297 2,563.762 ↑ 2,924.0 4 1

Hash Anti Join (cost=6,900.14..8,393.74 rows=11,696 width=24) (actual time=2,232.243..2,563.762 rows=4 loops=1)

  • Hash Cond: (o_his_1.machine_id = oh_sub.machine_id)
  • Join Filter: (o_his_1.acquisition_time < oh_sub.acquisition_time)
  • Rows Removed by Join Filter: 23086
50. 191.765 1,387.585 ↓ 1.0 17,558 1

Hash Join (cost=3,450.07..4,722.90 rows=17,544 width=24) (actual time=1,096.878..1,387.585 rows=17,558 loops=1)

  • Hash Cond: (o_loc_1.event_history_id = o_his_1.id)
51. 99.367 99.367 ↓ 1.0 17,558 1

Seq Scan on cq_occurrence_location o_loc_1 (cost=0.00..921.95 rows=17,544 width=8) (actual time=0.019..99.367 rows=17,558 loops=1)

  • Filter: ((language_code)::text = 'ja'::text)
  • Rows Removed by Filter: 17558
52. 561.714 1,096.453 ↓ 1.0 104,583 1

Hash (cost=2,142.81..2,142.81 rows=104,581 width=32) (actual time=1,096.453..1,096.453 rows=104,583 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 6537kB
53. 534.739 534.739 ↓ 1.0 104,583 1

Seq Scan on cq_occurrence_history o_his_1 (cost=0.00..2,142.81 rows=104,581 width=32) (actual time=0.011..534.739 rows=104,583 loops=1)

54. 551.089 1,079.880 ↓ 1.0 104,583 1

Hash (cost=2,142.81..2,142.81 rows=104,581 width=16) (actual time=1,079.880..1,079.880 rows=104,583 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 4903kB
55. 528.791 528.791 ↓ 1.0 104,583 1

Seq Scan on cq_occurrence_history oh_sub (cost=0.00..2,142.81 rows=104,581 width=16) (actual time=0.012..528.791 rows=104,583 loops=1)

56. 40.183 80.961 ↑ 1.1 7,741 1

Hash (cost=229.21..229.21 rows=8,421 width=17) (actual time=80.961..80.961 rows=7,741 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 405kB
57. 40.778 40.778 ↑ 1.1 7,741 1

Seq Scan on cq_events eve_1 (cost=0.00..229.21 rows=8,421 width=17) (actual time=0.027..40.778 rows=7,741 loops=1)

58. 103.894 1,496.019 ↓ 1.0 17,558 1

Hash (cost=4,722.90..4,722.90 rows=17,544 width=92) (actual time=1,496.019..1,496.019 rows=17,558 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 2254kB
59. 189.047 1,392.125 ↓ 1.0 17,558 1

Hash Join (cost=3,450.07..4,722.90 rows=17,544 width=92) (actual time=1,101.455..1,392.125 rows=17,558 loops=1)

  • Hash Cond: (o_loc.event_history_id = o_his.id)
60. 101.709 101.709 ↓ 1.0 17,558 1

Seq Scan on cq_occurrence_location o_loc (cost=0.00..921.95 rows=17,544 width=76) (actual time=0.032..101.709 rows=17,558 loops=1)

  • Filter: ((language_code)::text = 'ja'::text)
  • Rows Removed by Filter: 17558
61. 550.747 1,101.369 ↓ 1.0 104,583 1

Hash (cost=2,142.81..2,142.81 rows=104,581 width=32) (actual time=1,101.369..1,101.369 rows=104,583 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 6537kB
62. 550.622 550.622 ↓ 1.0 104,583 1

Seq Scan on cq_occurrence_history o_his (cost=0.00..2,142.81 rows=104,581 width=32) (actual time=0.028..550.622 rows=104,583 loops=1)

63. 0.132 0.132 ↑ 1.0 1 4

Index Scan using cq_events_index01 on cq_events eve (cost=0.29..0.31 rows=1 width=17) (actual time=0.027..0.033 rows=1 loops=4)

  • Index Cond: (id = o_his.event_id)
64. 0.047 2,409.222 ↑ 1.0 1 1

Materialize (cost=5,907.57..5,926.40 rows=1 width=284) (actual time=2,409.046..2,409.222 rows=1 loops=1)

65. 0.126 2,409.175 ↑ 1.0 1 1

Nested Loop (cost=5,907.57..5,926.39 rows=1 width=284) (actual time=2,409.013..2,409.175 rows=1 loops=1)

  • Join Filter: ((unnest('{SYSTEMALERT,INFORMATION,CAUTION,CRITICAL}'::text[])) = (cqel.policy_attribute)::text)
  • Rows Removed by Join Filter: 3
66. 0.082 2,408.957 ↓ 4.0 4 1

Nested Loop (cost=5,907.44..5,926.23 rows=1 width=88) (actual time=2,408.755..2,408.957 rows=4 loops=1)

67. 0.047 2,408.804 ↑ 1.0 1 1

Nested Loop Left Join (cost=5,907.44..5,923.72 rows=1 width=56) (actual time=2,408.697..2,408.804 rows=1 loops=1)

68. 0.068 2,408.613 ↑ 1.0 1 1

Nested Loop (cost=5,907.15..5,923.26 rows=1 width=40) (actual time=2,408.539..2,408.613 rows=1 loops=1)

  • Join Filter: (((first_value(eve_2.event_code) OVER (?)))::text = (cqe.event_code)::text)
69. 1.253 2,408.526 ↑ 1.0 1 1

Nested Loop (cost=5,906.87..5,914.94 rows=1 width=56) (actual time=2,408.475..2,408.526 rows=1 loops=1)

70. 0.899 2,406.833 ↓ 55.0 55 1

WindowAgg (cost=5,906.43..5,906.46 rows=1 width=29) (actual time=2,405.665..2,406.833 rows=55 loops=1)

71. 0.839 2,405.934 ↓ 55.0 55 1

Sort (cost=5,906.43..5,906.44 rows=1 width=29) (actual time=2,405.585..2,405.934 rows=55 loops=1)

  • Sort Key: foreve_1.machine_id, (unnest('{0,1,2,3}'::integer[]))
  • Sort Method: quicksort Memory: 29kB
72. 2.542 2,405.095 ↓ 55.0 55 1

Nested Loop (cost=5,470.97..5,906.42 rows=1 width=29) (actual time=2,392.019..2,405.095 rows=55 loops=1)

  • Join Filter: ((cqel_1.policy_attribute)::text = (unnest('{SYSTEMALERT,INFORMATION,CAUTION,CRITICAL}'::text[])))
  • Rows Removed by Join Filter: 165
73. 1.380 2,400.353 ↓ 55.0 55 1

Nested Loop (cost=5,470.97..5,903.66 rows=1 width=143) (actual time=2,391.767..2,400.353 rows=55 loops=1)

74. 1.471 2,397.983 ↓ 55.0 55 1

Nested Loop (cost=5,470.84..5,903.50 rows=1 width=33) (actual time=2,391.659..2,397.983 rows=55 loops=1)

75. 1.485 2,395.467 ↓ 55.0 55 1

Nested Loop (cost=5,470.56..5,903.18 rows=1 width=24) (actual time=2,391.619..2,395.467 rows=55 loops=1)

76. 554.165 2,391.672 ↓ 1.0 55 1

HashAggregate (cost=5,470.14..5,470.67 rows=53 width=16) (actual time=2,391.314..2,391.672 rows=55 loops=1)

  • Group Key: foreve_1.machine_id
77. 1,118.573 1,837.507 ↓ 1.0 104,583 1

Hash Join (cost=451.35..4,947.23 rows=104,581 width=16) (actual time=159.207..1,837.507 rows=104,583 loops=1)

  • Hash Cond: (foreve_1.event_id = eve_3.id)
78. 559.818 559.818 ↓ 1.0 104,583 1

Seq Scan on cq_occurrence_history foreve_1 (cost=0.00..2,142.81 rows=104,581 width=24) (actual time=0.012..559.818 rows=104,583 loops=1)

79. 41.761 159.116 ↑ 1.1 7,741 1

Hash (cost=346.09..346.09 rows=8,421 width=8) (actual time=159.116..159.116 rows=7,741 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 303kB
80. 79.053 117.355 ↑ 1.1 7,741 1

Hash Join (cost=1.09..346.09 rows=8,421 width=8) (actual time=0.167..117.355 rows=7,741 loops=1)

  • Hash Cond: (eve_3.event_level_id = cqel_2.id)
81. 38.220 38.220 ↑ 1.1 7,741 1

Seq Scan on cq_events eve_3 (cost=0.00..229.21 rows=8,421 width=16) (actual time=0.009..38.220 rows=7,741 loops=1)

82. 0.033 0.082 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=8) (actual time=0.082..0.082 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
83. 0.049 0.049 ↑ 1.0 4 1

Seq Scan on cq_event_levels cqel_2 (cost=0.00..1.04 rows=4 width=8) (actual time=0.028..0.049 rows=4 loops=1)

84. 2.310 2.310 ↑ 1.0 1 55

Index Scan using cq_occurrence_history_index04 on cq_occurrence_history foreve (cost=0.42..8.14 rows=1 width=24) (actual time=0.035..0.042 rows=1 loops=55)

  • Index Cond: ((machine_id = foreve_1.machine_id) AND (acquisition_time = (max(foreve_1.acquisition_time))))
85. 1.045 1.045 ↑ 1.0 1 55

Index Scan using cq_events_index01 on cq_events eve_2 (cost=0.29..0.31 rows=1 width=25) (actual time=0.012..0.019 rows=1 loops=55)

  • Index Cond: (id = foreve.event_id)
86. 0.990 0.990 ↑ 1.0 1 55

Index Only Scan using cq_event_levels_index02 on cq_event_levels cqel_1 (cost=0.13..0.15 rows=1 width=126) (actual time=0.011..0.018 rows=1 loops=55)

  • Index Cond: (id = eve_2.event_level_id)
  • Heap Fetches: 55
87. 2.200 2.200 ↑ 25.0 4 55

Result (cost=0.00..0.51 rows=100 width=0) (actual time=0.013..0.040 rows=4 loops=55)

88. 0.440 0.440 ↓ 0.0 0 55

Index Scan using cq_occurrence_history_index04 on cq_occurrence_history sub1 (cost=0.43..8.46 rows=1 width=24) (actual time=0.008..0.008 rows=0 loops=55)

  • Index Cond: ((machine_id = foreve_1.machine_id) AND (acquisition_time = (max(foreve_1.acquisition_time))) AND (acquisition_time >= ((to_date(to_char(now(), 'yyyy/MM/dd'::text), 'yyyy/MM/dd'::text) - 30) + 1)) AND (acquisition_time <= now()))
89. 0.019 0.019 ↑ 1.0 1 1

Index Scan using cq_events_index01 on cq_events cqe (cost=0.29..8.30 rows=1 width=25) (actual time=0.012..0.019 rows=1 loops=1)

  • Index Cond: (id = sub1.event_id)
90. 0.144 0.144 ↑ 1.0 1 1

Index Scan using cq_events_international_index01 on cq_events_international cqei (cost=0.29..0.45 rows=1 width=32) (actual time=0.137..0.144 rows=1 loops=1)

  • Index Cond: ((cqe.id = event_id) AND ((language_code)::text = 'ja'::text))
91. 0.071 0.071 ↑ 25.0 4 1

Result (cost=0.00..0.51 rows=100 width=0) (actual time=0.037..0.071 rows=4 loops=1)

92. 0.092 0.092 ↑ 1.0 1 4

Index Scan using cq_event_levels_index02 on cq_event_levels cqel (cost=0.13..0.15 rows=1 width=244) (actual time=0.015..0.023 rows=1 loops=4)

  • Index Cond: (id = cqe.event_level_id)
93. 0.996 1,713.473 ↓ 1.3 65 1

Sort (cost=4,752.71..4,752.83 rows=50 width=16) (actual time=1,712.962..1,713.473 rows=65 loops=1)

  • Sort Key: cqch.terminal_id
  • Sort Method: quicksort Memory: 27kB
94. 0.705 1,712.477 ↓ 1.1 53 1

Subquery Scan on cqch (cost=4,750.29..4,751.29 rows=50 width=16) (actual time=1,711.398..1,712.477 rows=53 loops=1)

95. 822.392 1,711.772 ↓ 1.1 53 1

HashAggregate (cost=4,750.29..4,750.79 rows=50 width=16) (actual time=1,711.384..1,711.772 rows=53 loops=1)

  • Group Key: cq_communication_history.terminal_id
96. 889.380 889.380 ↑ 1.0 115,153 1

Seq Scan on cq_communication_history (cost=0.00..4,174.53 rows=115,153 width=16) (actual time=0.063..889.380 rows=115,153 loops=1)

97. 3.822 3.822 ↑ 1.0 1 147

Index Scan using pk_cq_machines_location on cq_machines_location cqml (cost=0.28..0.73 rows=1 width=18) (actual time=0.018..0.026 rows=1 loops=147)

  • Index Cond: ((cqm.id = machine_id) AND ((language_code)::text = 'ja'::text))
98. 6.365 12.503 ↓ 1.0 820 1

Hash (cost=24.18..24.18 rows=818 width=20) (actual time=12.503..12.503 rows=820 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 45kB
99. 6.138 6.138 ↓ 1.0 820 1

Seq Scan on cq_terminals cqt (cost=0.00..24.18 rows=818 width=20) (actual time=0.035..6.138 rows=820 loops=1)