Export (0) Print
Expand All

How to: Control the Gathering and Display of Client Statistics

When you execute a script or query in the Transact-SQL editor, you can choose to collect client statistics for each execution of the script or query. You use the client statistics to gather information about execution times, the amount of data sent between client and server, and so on. For more information about the data that is collected, see Query Results Overview.

Statistics will continue to be gathered and averages updated, even if you are executing a completely different query as long as you continue to execute queries within the same editor session. You can clear the client statistics and reset the averages.

To turn on or off the gathering of client statistics

  1. Open a Transact-SQL editor session. For more information, see How to: Start the Transact-SQL Editor.

  2. On the Data menu, point to T-SQL Editor, and click Include Client Statistics.

    The menu item is a toggle. The first click turns on the gathering of client statistics, and the second click turns it back off. You can also toggle client statistics by clicking Include Client Statistics on the T-SQL Editor toolbar or by right-clicking in the T-SQL editor and then clicking Include Client Statistics.

  3. Execute a query in the T-SQL editor.

    If you turned on client statistics, the Client Statistics tab appears in the Results pane. If you turned off client statistics, the Client Statistics tab does not appear.

To clear client statistics and reset averages

  • On the Data menu, point to T-SQL Editor, and click Reset Client Statistics

    - or -

    Right-click within the T-SQL editor and click Reset Client Statistics on the shortcut menu.

    NoteNote:

    This menu command is available only if you have collected one or more sets of client statistics.

    The Client Statistics tab disappears from the Results pane, and existing client statistics are cleared. The next time that you execute a query, new statistics are gathered.

Community Additions

ADD
Show:
© 2015 Microsoft