Seems like cli is getting 50/100 rows at a time instead of immediately outputting row by row. Might be a PrefetchSize-Problem of JDBC