Add tests for statistics and migrate from old select service to custom service methods.  This makes the stats work on all databases.