Added option to run an unbuffered query