How long does the Data Explorer Refresh take for each database?


Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

declare @sql nvarchar(max)
select @sql = concat('select 
rank() over (order by seconds desc) [duration rank]
, rank() over (order by [start]) [start time rank]
, * from (' ,string_agg(concat('
    select ''', name , ''' [site] 
    , min(create_date) [Start]
    , max(create_date) [Finish] 
    , datediff(s, min(create_date), max(create_date)) [seconds]
    , (select sum(size) 
    from ',  cast(quotename(name) as nvarchar(max)), '.sys.database_files) [size]
    from '
    , cast(quotename(name) as nvarchar(max)), '.sys.objects o
    where type in (''U'', ''V'')
  , ' union all ')
  , ') data order by [seconds] desc')
from sys.databases
where database_id > 5
and name not like '%_temp'


print ##cachebreaker:string##

Enter Parameters

Switch to meta site
loading Hold tight while we fetch your results