How To: View the Execution Plan for a SQL Server Compact Query

In this topic, you will learn how to view the execution plan for a Microsoft SQL Server Compact 4.0 query.

To view the execution plan for a query

  1. Open Visual Studio 2010 SP1.

  2. On the Data menu, select the Transact-SQL editor and connect. For more information on how to connect to Transact-SQL editor, see How To: Use Transact SQL (T-SQL) Editor for Queries.

  3. If there is no query in the query pane, open a saved query or create a new query.

  4. Right-click the editor, and then click Display Estimated Execution Plan.

    A graphical representation of the execution plan is displayed. You can position the pointer over graphical elements to reveal additional execution plan information.

  5. On the Transact-SQL Editor toolbar, click Execute SQL.

See Also

Other Resources

Querying Databases (SQL Server Compact)