카테고리 없음

at time zone

보미아빠 2023. 6. 23. 18:35
; with cte 	
as	
(	
	select [timestamp] at time zone 'Korea Standard Time' kst, * 
	from t230614
) 	
select cast(duration / 1000. as int) milisec, * 	
from cte	
where kst >= '2023-06-14 00:00:00.0000000 +09:00'	
	and statement like '%text%'
	and name = 'sp_statement_completed'
order by kst 	


; with cte 	
as	
(	
	select [timestamp] at time zone 'Korea Standard Time' kst, * 
	from t230614
) 	
select cast(duration / 1000. as int) milisec, * 	
from cte	
where kst >= '2023-06-14 00:00:00.0000000 +09:00'


; with cte 	
as	
(	
	select [timestamp] at time zone 'Korea Standard Time' kst, * 
	from [im0802]
) 	
, a as 
(select cast(duration / 1000. as int) milisec, * 	
from cte	
where kst >= '2024-08-02 09:00:26.4842673 +09:00'
	and kst <= '2024-08-02 09:00:59.5437674 +09:00'
	and  name in (
        'wait_info'
        ,'wait_info_external'
        )
)
select wait_type, sum(duration) sum_duration 
from a 
group by wait_type 
order by 2 desc 

; with cte 	
as	
(	
	select [timestamp] at time zone 'Korea Standard Time' kst, * 
	from [im0802]
) 	
select cast(duration / 1000. as int) milisec, * 	
from cte	
where kst >= '2024-08-01 08:00:26.4842673 +09:00'
	and kst <= '2024-08-02 11:00:59.5437674 +09:00'
	and  name in (
        'rpc_completed'
        ,'sql_batch_completed'
        ,'sp_statement_completed'
        ,'sql_statement_completed'
        )
	and statement like '%aaa%'
order by 2