Skip to main content
Answer

Azure : Query Performance Insight → Long Running Queries

  • November 30, 2023
  • 2 replies
  • 169 views

Forum|alt.badge.img+1

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

Best answer by Erwin Ekkel

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

This topic has been closed for replies.

2 replies

Forum|alt.badge.img+17
  • Moderator
  • Answer
  • December 1, 2023

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


Jeroen van den Belt
Administrator
Forum|alt.badge.img+10

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