refs #6933 use unbuffered query to reduce mem usage; leave most of original code in place for reference
Merge branch 'dev' into test