In regards to SET STATISTICS TIME ON
and SET STATISTICS IO ON
I noticed in the remarks of the Microsoft doc, it says the following:
When STATISTICS IO is ON, statistical information is displayed, and when OFF, the information isn't displayed.
After this option is set ON, all Transact-SQL statements return the statistical information until the option is set to OFF.
Does that mean all Transact-SQL statements that execute in the current connection, or across the whole server? When I tested it myself, it seemed to be only within the scope of my connection.