Long running prepare statements on Azure SQL Data Warehouse

556 views Asked by At

I am running a functional test of a 3rd party application on an Azure SQL Data Warehouse database set at DWU 1000. In reviewing the current activity via:

sys.dm_pdw_exec_requests

I see:

  • prepare statements taking 30+ seconds,
  • NULL statements taking up to 25 seconds,
  • compilation of statements takes up to 60 seconds,
  • explain statements taking 60+ seconds, and
  • select count(1) from empty tables take 60+ seconds.

How does one identify the bottleneck involved?

The test has been running for a few hours and the Azure portal shows little DWU consumed on average, so I doubt that modifying the DWU will make any difference.

The third-party application has workload management feature, so I've specified a limit of 30 connections to the ADW database (understanding that only 32 sessions are active on the database itself.)

There are approximately ~1,800 tables and ~350 views in the database across 29 schemas (per information_schema.tables).

I am in a functional testing mode, so many of the tables involved in the queries have not yet been loaded, but statistics have been created on every column on every table in the scope of the test.

One userID is being used in the test. It is in smallrc.

1

There are 1 answers

1
Abraham On

have a look at your tables - in the query? Make sure all columns in joins, group by, and order by have up-to-date statistics.

https://learn.microsoft.com/en-us/azure/sql-data-warehouse/sql-data-warehouse-tables-statistics