Udostępnij za pośrednictwem


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 Transact-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 Transact-SQL Editor toolbar or by right-clicking in the Transact-SQL editor and then clicking Include Client Statistics.

  3. Execute a query in the Transact-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.

See Also

Tasks

How to: Execute a Query

Concepts

Query Results Overview

Editing Database Scripts and Objects with the Transact-SQL Editor