Testing - further database query reduction