Improve Query Performance

Currently, the API call to get traffic statistics takes several seconds. A new query should reduce the time it takes to respond.