Execution Plans in Azure SQL Database

Yes you can still get execution plans for Azure SQL Database, you cannot get this from the Azure Portal so it is good to know for your tuning days. It is based on the same code you have probably run many times before. Lets get the plan handle and work through an example.

As you can see, I am connected to Azure and issue a query where I want the plan handle.

SELECT @@VERSION

octoberazure

 SELECT top 10 (total_logical_reads/execution_count),
  (total_logical_writes/execution_count),
  (total_physical_reads/execution_count),
  Execution_count, sql_handle, plan_handle
FROM sys.dm_exec_query_stats
ORDER BY (total_logical_reads + total_logical_writes) Desc

planhandles
Pass the handle in.


SELECT *
FROM sys.dm_exec_query_plan (0x05000600717D5F4D50E12720D401000001000000000000000000000000000000000000000000000000000000)

click

Analyse it.

eplans

 

 

3 thoughts on “Execution Plans in Azure SQL Database

  1. Pingback: Dew Drop – November 21, 2019 (#3077) | Morning Dew

  2. Pingback: Azure SQL Database Execution Plans – Curated SQL

  3. Pingback: View execution plan in SQL Azure – A developer's blog

Leave a Reply