Modified usage to be correct and fast

The slowness was due entirely to poor programming:
I was starting a new database connection for every
query and never closing the connection.  Also my
algorithm for computing the usage was wrong.  I now
take the same of all values for the time period and
then divide by 60 since there are 60 submissions per
hour.