cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

continue execution of query on sys.tables with cross apply

Gustavo.Lopez
Wanderer

Due to some performance problems in a production SQL SERVER database , I ran a trace and observed that APPDYNAMICS constantly executes the following query:

declare @p1 int

set @p1=NULL

exec sp_prepexec @p1 output,N'@P0 bigint,@P1 bigint,@P2 bigint,@P3 bigint,@P4 bigint',N'SELECT OBJECT_SCHEMA_NAME(t.object_id, @P0), object_name(t.object_id, @p1) AS object_name FROM sys.tables AS t CROSS APPLY sys.dm_db_database_page_allocations (@P2 , object_id, NULL, NULL, ''LIMITED'') AS pa WHERE pa.allocated_page_file_id = @P3 AND pa.allocated_page_page_id = @P4                                        ',5,5,5,1,9865239

select @p1

GustavoLopez_0-1673974522436.png

It never reaches completion because it is canceled by time after running  over 10 sec . 

Could someone help me with this matter?

 

0 REPLIES 0