Core component of SQL Server for storing, processing, and securing data
Hi Bruno,
Here are a few suggestions that might help.
It may be worth removing the confound first. The 2016/2022 comparison changes three things at once: engine version, database copy, and local vs. remote. If you can, restore the same database on 2022, and also try connecting to 2025 from another machine. If either test is fast, that would narrow things down considerably.
Login cost (PBKDF2) seems less likely here, since you’re on the same session and the requests are fast when no forms are open. Running Dan’s process_login_finish session during a repro would be a quick way to confirm.
Because the delay only appears with bound forms open, I suspect a client-side cause, possibly Access/ACE background-fetching a form’s partially consumed recordset. That would also fit your observation that fully fetching recordsets helped.
Two captures could help confirm this:
XE: capture rpc_completed and sql_batch_completed for all sessions from the client, not only the test session, and look for sp_cursor* activity between your requests.
ODBC trace: check whether the 200 ms passes before SQLExecDirect starts or inside the call.