Switched analytics screen to use DB

Faster than waiting for all the history API calls