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 top 10 (total_logical_reads/execution_count),
  Execution_count, sql_handle, plan_handle
FROM sys.dm_exec_query_stats
ORDER BY (total_logical_reads + total_logical_writes) Desc

Pass the handle in.

FROM sys.dm_exec_query_plan (0x05000600717D5F4D50E12720D401000001000000000000000000000000000000000000000000000000000000)


Analyse it.





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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s