I am executing a query remotely using mysql utility and also through mysqlsh utility. I see that with mysql, entire dataset is loaded in memory at once, whereas in case of mysqlsh, it appears to be fetching a single row or a subset of rows at a time. I want to achieve the same behaviour as mysql in mysqlsh. Any configurations available for this in mysqlsh ?
mysql -h <> -p <> database < query.sql