switch to model-based config, test use of raw sql for generating stats