refs #12202 query optimization