1 DEFINE{query_name 'dc_connect';
2 max_lfta_disorder '1'; max_hfta_disorder '1';
5 select timestamp_ms as timestamp,
7 UINT(id_MeNB_UE_X2AP_ID) as eUE_ID,
8 UINT(id_SgNB_UE_X2AP_ID) as gUE_ID,
10 from RECONCOMPLETE.reconfig_success
13 -- use id_New_eNB_UE_X2AP_ID for eUE_ID ???? Or take max to combine them
14 DEFINE{query_name 'dc_terminate';
15 max_lfta_disorder '1'; max_hfta_disorder '1';
18 select timestamp_ms as timestamp,
20 UINT(id_Old_eNB_UE_X2AP_ID) as eUE_ID,
21 id_SgNB_UE_X2AP_ID as gUE_ID,
23 from CONRELEASE.dc_release
26 DEFINE{query_name 'dc_events';}
28 merge p1.timestamp : p2.timestamp
29 from dc_connect p1, dc_terminate p2
32 DEFINE{query_name 'dc_events_gtp_teid';
33 comment 'tag dc_events with the gtp_teid';
34 max_lfta_disorder '1'; max_hfta_disorder '1';
37 Select M.TB, non_temporal(d.timestamp), d.gnb_id, d.eUE_ID, d.gUE_ID, d.event_type, M.gTP_TEID
38 LEFT_OUTER_JOIN from dc_events d, gnb_ueid_teid_map M
39 Where d.gnb_id=M.GNB_ID and d.gUE_ID=M.id_SgNB_UE_X2AP_ID
40 and d.timestamp/$window=M.TB
43 DEFINE{query_name 'dc_events_pci';
44 max_lfta_disorder '1'; max_hfta_disorder '1';
45 comment 'tag dc_events with the pci';
48 Select M.TB, non_temporal(d.timestamp) as timestamp, d.gnb_id, d.eUE_ID, d.gUE_ID, d.event_type, M.physCellId
49 LEFT_OUTER_JOIN from dc_events d, gnb_ueid_cellid_map M
50 Where d.gnb_id=M.GNB_ID and d.gUE_ID=M.id_SgNB_UE_X2AP_ID
51 and d.timestamp/$window=M.TB
55 DEFINE{ query_name 'mc_connected_ues';
56 max_lfta_disorder '1'; max_hfta_disorder '1';
59 SELECT TB, UE_ID, GNB_ID,
60 ((TB+1)*$window-LAST(timestamp))/1000.0 as connected_time
62 GROUP BY timestamp / $window as TB, gUE_ID as UE_ID, gnb_id as GNB_ID
63 HAVING LAST(event_type) = 1
64 CLOSING_WHEN LAST(event_type) = 0 OR
65 ((TB+1)*$window-LAST(timestamp))/1000.0 >= 3600
68 DEFINE{ query_name 'mc_connected_ues_pci';
69 max_lfta_disorder '1'; max_hfta_disorder '1';
72 SELECT TB, UE_ID, GNB_ID, physCellId,
73 ((TB+1)*$window-LAST(timestamp))/1000.0 as connected_time
75 GROUP BY TB, gUE_ID as UE_ID, gnb_id as GNB_ID, physCellId
76 HAVING LAST(event_type) = 1
77 CLOSING_WHEN LAST(event_type) = 0 OR
78 ((TB+1)*$window-LAST(timestamp))/1000.0 >= 3600
81 DEFINE{ query_name 'mc_connected_cnt';
82 max_lfta_disorder '1'; max_hfta_disorder '1';
83 comment 'Number of dual connected sessions';
86 SELECT ($window*(TB+1))/1000 as TS, GNB_ID,
87 $window/1000.0 as measurementInterval, // standard_name
88 COUNT(*) as count_connected_ue
93 DEFINE{ query_name 'mc_connected_cnt_pci';
94 max_lfta_disorder '1'; max_hfta_disorder '1';
95 comment 'Number of dual connected users by gnb and pci';
98 SELECT ($window*(TB+1))/1000 as TS, GNB_ID, physCellId,
99 $window/1000.0 as measurementInterval, // standard_name
100 COUNT(*) as count_connected_ue
101 FROM mc_connected_ues_pci
102 GROUP BY TB, GNB_ID, physCellId
107 DEFINE{ query_name 'mc_disconnected_ues';
108 max_lfta_disorder '1'; max_hfta_disorder '1';
110 PARAM{ window uint; }
111 SELECT TB_1000, UE_ID, GNB_ID,
112 UINT((LAST(timestamp) - FIRST(timestamp))) as connected_time
114 GROUP BY timestamp / 1000 as TB_1000, gUE_ID as UE_ID, gnb_id as GNB_ID
115 HAVING LAST(event_type) = 0
116 CLOSING_WHEN LAST(event_type) = 0 OR
117 ((TB_1000+1)*1000-LAST(timestamp))/1000.0 >= 3600
122 DEFINE{ query_name 'mc_connection_stats';
123 max_lfta_disorder '1'; max_hfta_disorder '1';
124 comment 'statistics about the length of dual connected sessions by gnb';
126 PARAM{ window uint; }
127 SELECT ($window*(TB+1))/1000 as TS, GNB_ID,
128 $window/1000.0 as measurementInterval, // standard_name
129 MIN(connected_time)/1000.0 as min_connected_time,
130 MAX(connected_time)/1000.0 as max_connected_time,
131 AVG(connected_time)/1000.0 as avg_connected_time,
132 quantile_of(connected_time, .05)/1000.0 as pctl_05_connected_time,
133 quantile_of(connected_time, .95)/1000.0 as pctl_95_connected_time,
135 sum((connected_time/1000.0)*(connected_time/1000.0)) - sum(connected_time/1000.0)*sum(connected_time/1000.0)/count(*)
136 ) / count(*) as stddev_connected_time
137 FROM mc_disconnected_ues
138 GROUP BY (TB_1000 * 1000) / $window as TB, GNB_ID
141 DEFINE{ query_name 'mc_disconnected_gtp_teids';
142 max_lfta_disorder '1'; max_hfta_disorder '1';
144 PARAM{ window uint; }
145 Select m.TB, m.gTP_TEID, d.GNB_ID, d.connected_time
146 LEFT_OUTER_JOIN from mc_disconnected_ues d, gnb_ueid_teid_map m
147 where d.GNB_ID=m.GNB_ID and d.UE_ID=m.id_SgNB_UE_X2AP_ID and
148 (d.TB_1000 * 1000) / $window = m.TB
151 DEFINE{ query_name 'mc_connection_stats_gtp_teid';
152 max_lfta_disorder '1'; max_hfta_disorder '1';
153 comment 'statistics about the length of dual connected sessions, by gtp_teid';
155 PARAM{ window uint; }
156 SELECT ($window*(TB+1))/1000 as TS, GNB_ID, gTP_TEID,
157 $window/1000.0 as measurementInterval, // standard_name
158 MIN(connected_time)/1000.0 as min_connected_time,
159 MAX(connected_time)/1000.0 as max_connected_time,
160 AVG(connected_time)/1000.0 as avg_connected_time,
161 quantile_of(connected_time, .05)/1000.0 as pctl_05_connected_time,
162 quantile_of(connected_time, .95)/1000.0 as pctl_95_connected_time,
164 sum((connected_time/1000.0)*(connected_time/1000.0)) - sum(connected_time/1000.0)*sum(connected_time/1000.0)/count(*)
165 ) / count(*) as stddev_connected_time
166 FROM mc_disconnected_gtp_teids
167 GROUP BY TB, GNB_ID, gTP_TEID
173 DEFINE{ query_name 'mc_connects_cnt';
174 max_lfta_disorder '1'; max_hfta_disorder '1';
175 comment 'number of DC connection requests, by GNB';
177 PARAM{ window uint; }
178 SELECT ($window*(TB+1))/1000 as TS, GNB_ID,
179 $window/1000.0 as measurementInterval, // standard_name
180 COUNT(*) as count_ue_connects
183 GROUP BY timestamp / $window as TB, gnb_id as GNB_ID
186 DEFINE{ query_name 'mc_connects_cnt_pci';
187 max_lfta_disorder '1'; max_hfta_disorder '1';
188 comment 'number of DC connection requests, by GNB and PCI';
190 PARAM{ window uint; }
191 SELECT ($window*(TB+1))/1000 as TS, GNB_ID, physCellId,
192 $window/1000.0 as measurementInterval, // standard_name
193 COUNT(*) as count_ue_connects
196 GROUP BY TB, gnb_id as GNB_ID, physCellId
199 DEFINE{ query_name 'mc_connects_cnt_gtp_teid';
200 max_lfta_disorder '1'; max_hfta_disorder '1';
201 comment 'number of DC connection requests by UE';
203 PARAM{ window uint; }
204 SELECT ($window*(TB+1))/1000 as TS, GNB_ID, gTP_TEID,
205 $window/1000.0 as measurementInterval, // standard_name
206 COUNT(*) as count_ue_connects
207 FROM dc_events_gtp_teid
209 GROUP BY TB, gnb_id as GNB_ID, gTP_TEID
212 DEFINE{ query_name 'mc_disconnects_cnt';
213 max_lfta_disorder '1'; max_hfta_disorder '1';
214 comment 'number of DC connection releases';
216 PARAM{ window uint; }
217 SELECT ($window*(TB+1))/1000 as TS, GNB_ID,
218 $window/1000.0 as measurementInterval, // standard_name
219 COUNT(*) as count_ue_disconnects
222 GROUP BY timestamp / $window as TB, gnb_id as GNB_ID
225 DEFINE{ query_name 'mc_unique_ues';
226 max_lfta_disorder '1'; max_hfta_disorder '1';
228 PARAM{ window uint; }
229 SELECT TB, UE_ID, GNB_ID
231 GROUP BY timestamp / $window as TB, gUE_ID as UE_ID, gnb_id as GNB_ID
234 DEFINE{ query_name 'mc_unique_ues_pci';
235 max_lfta_disorder '1'; max_hfta_disorder '1';
237 PARAM{ window uint; }
238 SELECT TB, UE_ID, GNB_ID, physCellId
241 gUE_ID as UE_ID, gnb_id as GNB_ID, physCellId
246 DEFINE{ query_name 'mc_unique_ue_cnt';
247 max_lfta_disorder '1'; max_hfta_disorder '1';
248 comment 'Number of distinct UEs making a DC request or release';
250 PARAM{ window uint; }
251 SELECT ($window*(TB+1))/1000 as TS, GNB_ID,
252 $window/1000.0 as measurementInterval, // standard_name
253 COUNT(*) as count_unique_ue
259 DEFINE{ query_name 'mc_unique_ue_pci_cnt';
260 max_lfta_disorder '1'; max_hfta_disorder '1';
261 comment 'Number of distinct UEs making a DC request or release by pci';
263 PARAM{ window uint; }
264 SELECT ($window*(TB+1))/1000 as TS, GNB_ID, physCellId,
265 $window/1000.0 as measurementInterval, // standard_name
266 COUNT(*) as count_unique_ue
267 FROM mc_unique_ues_pci
268 GROUP BY TB, GNB_ID, physCellId