read histogram stats from stat table instead of calculating it each time
use new stats table for location data in global stats