Solved

Azure : Query Performance Insight → Long Running Queries

  • 30 November 2023
  • 2 replies
  • 77 views

Userlevel 1
Badge +1
  • Apprentice
  • 8 replies

Hi,

in Azure SQL Database in Query Performance Insight → Long Running Queries I have a query (see screenshot) and I can’t seem to find what is triggering this query. In the second screenshot you can see that every execution takes about 7 seconds.

I have an item table with a system versioning table called item_history in Azure database but I already checked in Software Factory if there is anything that could trigger the query but can’t seem to find anything.

Does someone have an explanation for this ? Or can give me some pointers to look elsewhere.

Thank you.

 

Query in text:

SELECT [tsf_valid_from],[tsf_valid_to],[$S],[$tabType] FROM (SELECT [tsf_valid_from],[tsf_valid_to],LAG ([tsf_valid_to]) OVER (PARTITION BY [item_id] ORDER BY [tsf_valid_from],[tsf_valid_to]) AS [$S],[$tabType] FROM (SELECT [item_id],[tsf_valid_from],[tsf_valid_to], 0 AS [$tabType] FROM [dbo].[item_history] UNION ALL SELECT [item_id],[tsf_valid_from],[tsf_valid_to], 1 AS [$tabType] FROM [dbo].[item]) AS R) AS T

 

query item_history from Azure 
duration and executions of query

 

Kind regards,

Tim

icon

Best answer by Erwin Ekkel 1 December 2023, 09:08

View original

This topic has been closed for comments

2 replies

Userlevel 6
Badge +16

Did you check for any outside sources? Reporting, an external application, an api etc. 

Userlevel 5
Badge +8

Hi @tim, can you please respond to the question Erwin asked? Thanks!