Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI SQL Client OLEDB

Execution plans

  • Last UpdatedJan 04, 2023
  • 1 minute read

When you create a query, the SQL engine will first parse the query and attempt to determine the most optimized way to execute the query. Execution plans graphically display the data retrieval methods chosen by the SQL Server query optimizer. You can view the estimated execution plan and the actual execution plan in SSMS.

The estimated execution plan shows the query execution plan that the SQL engine would most likely use if the query were actually executed. The actual execution plan shows the actual query execution plan that SQL engine used when it executed the query.

Either option allows you to understand the impact of the queries you are running and compare the different options you can use.

For example, the following queries return the same results, but are executed differently.

Query 1

SELECT * FROM [LINKED_AFSERVER_NAME].[Master].[Element].[Element]

Query 2

SELECT * FROM OPENQUERY(LINKED_AFSERVER_NAME, 'SELECT * FROM [Master].[Element].[Element]')

The following image shows the difference in the execution plans of the queries.

For more information about execution plans, see the Microsoft article, Display and Save Execution Plans.

TitleResults for “How to create a CRG?”Also Available in