I have a question, something is unclear how query SQL behaves:
select max(id) from t1@sql
with 588K records in the table, Query Tool takes 22 seconds to print the result:
select id from t1@sql order by id desc limit 1
with 588K records in the table, Query Tool takes 23 seconds to print the result.
It seems that both statement are not passing the
MAX nor the
ORDER BY to the SQL Server data container on
@sql, instead loading all the records and doing the operation Query Tool side, not SQL server side.
Am I wrong?