JAL-2001 faster getMax/getMin selected column, with tests