Update database tables structure and use milliseconds to measure the
time elapsed in a request to MonitoringStart and MonitoringStopt, solved
minor problems with cursor used when it is null or 0 rows