Revision 54431
Added by Tsampikos Livisianos over 5 years ago
StatsDAO.java | ||
---|---|---|
130 | 130 |
log.info("Schema renamed"); |
131 | 131 |
} |
132 | 132 |
|
133 |
public void addArrayColumns() throws Exception { |
|
134 |
log.info("Adding new columns ..."); |
|
135 |
Connection con = statsDatasource.getConnection(); |
|
136 |
|
|
137 |
startTime = System.currentTimeMillis(); |
|
138 |
String q = "{call shadow.create_arrays()}"; |
|
139 |
|
|
140 |
CallableStatement st = con.prepareCall(q); |
|
141 |
st.execute(); |
|
142 |
|
|
143 |
st.close(); |
|
144 |
con.close(); |
|
145 |
|
|
146 |
endtime = System.currentTimeMillis(); |
|
147 |
log.info("Time to add columns: " + ((endtime - startTime) / 60000) + " minutes "); |
|
148 |
} |
|
149 |
|
|
133 | 150 |
public void cleanTables() throws Exception { |
134 | 151 |
log.info(" Cleaning Tables..."); |
135 | 152 |
Connection con = statsDatasource.getConnection(); |
... | ... | |
169 | 186 |
Connection con = statsDatasource.getConnection(); |
170 | 187 |
|
171 | 188 |
startTime = System.currentTimeMillis(); |
172 |
String q = "{call create_charts()}"; |
|
189 |
String q = "{call shadow.create_charts()}";
|
|
173 | 190 |
|
174 | 191 |
CallableStatement st = con.prepareCall(q); |
175 | 192 |
st.execute(); |
... | ... | |
191 | 208 |
Connection con = statsDatasource.getConnection(); |
192 | 209 |
|
193 | 210 |
startTime = System.currentTimeMillis(); |
194 |
String q = "{call create_chart_indexes()}"; |
|
211 |
String q = "{call shadow.create_chart_indexes()}";
|
|
195 | 212 |
|
196 | 213 |
CallableStatement st = con.prepareCall(q); |
197 | 214 |
st.execute(); |
... | ... | |
212 | 229 |
log.info(" Building Database Indexes..."); |
213 | 230 |
Connection con = statsDatasource.getConnection(); |
214 | 231 |
startTime = System.currentTimeMillis(); |
215 |
String q = "{call create_indexes()}"; |
|
232 |
String q = "{call shadow.create_indexes()}";
|
|
216 | 233 |
CallableStatement st = con.prepareCall(q); |
217 | 234 |
st.execute(); |
218 | 235 |
st.close(); |
... | ... | |
231 | 248 |
Connection con = statsDatasource.getConnection(); |
232 | 249 |
|
233 | 250 |
startTime = System.currentTimeMillis(); |
234 |
String q = "{call create_views()}"; |
|
251 |
String q = "{call shadow.create_views()}";
|
|
235 | 252 |
|
236 | 253 |
CallableStatement st = con.prepareCall(q); |
237 | 254 |
st.execute(); |
... | ... | |
254 | 271 |
startTime = System.currentTimeMillis(); |
255 | 272 |
|
256 | 273 |
populateDefaults(); |
257 |
update_project_results(); |
|
258 |
//update_project_has_pubs();
|
|
259 |
//update_project_pubs_count();
|
|
260 |
//update_project_delated_pubs();
|
|
261 |
//update_project_daysforlastpub();
|
|
262 |
//update_project_delayed_pubs();
|
|
274 |
//update_project_results();
|
|
275 |
update_project_has_pubs(); |
|
276 |
update_project_pubs_count(); |
|
277 |
update_project_delated_pubs(); |
|
278 |
update_project_daysforlastpub(); |
|
279 |
update_project_delayed_pubs(); |
|
263 | 280 |
cleanUp(); |
264 | 281 |
|
265 | 282 |
endtime = System.currentTimeMillis(); |
... | ... | |
274 | 291 |
Connection con = statsDatasource.getConnection(); |
275 | 292 |
|
276 | 293 |
startTime = System.currentTimeMillis(); |
277 |
String q = "{call extra_defaults_datasource()}"; |
|
294 |
String q = "{call shadow.extra_defaults_datasource()}";
|
|
278 | 295 |
|
279 | 296 |
CallableStatement st = con.prepareCall(q); |
280 | 297 |
st.execute(); |
... | ... | |
296 | 313 |
Connection con = statsDatasource.getConnection(); |
297 | 314 |
|
298 | 315 |
startTime = System.currentTimeMillis(); |
299 |
String q = "{call update_project_results()}"; |
|
316 |
String q = "{call shadow.update_project_results()}";
|
|
300 | 317 |
|
301 | 318 |
CallableStatement st = con.prepareCall(q); |
302 | 319 |
st.execute(); |
... | ... | |
319 | 336 |
Connection con = statsDatasource.getConnection(); |
320 | 337 |
|
321 | 338 |
startTime = System.currentTimeMillis(); |
322 |
String q = "{call project_has_pubs()}"; |
|
339 |
String q = "{call shadow.project_has_pubs()}";
|
|
323 | 340 |
|
324 | 341 |
CallableStatement st = con.prepareCall(q); |
325 | 342 |
st.execute(); |
... | ... | |
341 | 358 |
Connection con = statsDatasource.getConnection(); |
342 | 359 |
|
343 | 360 |
startTime = System.currentTimeMillis(); |
344 |
String q = "{call project_pubs_count()}"; |
|
361 |
String q = "{call shadow.project_pubs_count()}";
|
|
345 | 362 |
|
346 | 363 |
CallableStatement st = con.prepareCall(q); |
347 | 364 |
st.execute(); |
... | ... | |
363 | 380 |
Connection con = statsDatasource.getConnection(); |
364 | 381 |
|
365 | 382 |
startTime = System.currentTimeMillis(); |
366 |
String q = "{call project_delayedpubs()}"; |
|
383 |
String q = "{call shadow.project_delayedpubs()}";
|
|
367 | 384 |
|
368 | 385 |
CallableStatement st = con.prepareCall(q); |
369 | 386 |
st.execute(); |
... | ... | |
387 | 404 |
Connection con = statsDatasource.getConnection(); |
388 | 405 |
|
389 | 406 |
startTime = System.currentTimeMillis(); |
390 |
String q = "{call project_daysforlastpub()}"; |
|
407 |
String q = "{call shadow.project_daysforlastpub()}";
|
|
391 | 408 |
|
392 | 409 |
CallableStatement st = con.prepareCall(q); |
393 | 410 |
st.execute(); |
... | ... | |
411 | 428 |
Connection con = statsDatasource.getConnection(); |
412 | 429 |
|
413 | 430 |
startTime = System.currentTimeMillis(); |
414 |
String q = "{call project_delayed()}"; |
|
431 |
String q = "{call shadow.project_delayed()}";
|
|
415 | 432 |
|
416 | 433 |
CallableStatement st = con.prepareCall(q); |
417 | 434 |
st.execute(); |
... | ... | |
434 | 451 |
Connection con = statsDatasource.getConnection(); |
435 | 452 |
|
436 | 453 |
startTime = System.currentTimeMillis(); |
437 |
String q = "{call cleanTemps()}"; |
|
454 |
String q = "{call shadow.cleanTemps()}";
|
|
438 | 455 |
|
439 | 456 |
CallableStatement st = con.prepareCall(q); |
440 | 457 |
st.execute(); |
Also available in: Unified diff
finalize new-schema for betadb