Status of the SEDE Refresh on Sunday 03:00 UTC

5

Please login or register to vote for this query.

(click on this box to dismiss)

Emacs

Q&A for those using, extending or developing Emacs

-- cachebreaker: Any unique number: "So you can break the cache"
;with 
oldest_db as
(
select top 1 database_id, name, create_date, datediff(d, create_date, getdate()) [days ago]
from sys.databases
where database_id > 5
order by create_date
), 
newest_db as
(
select top 1 database_id, name, create_date, datediff(d, create_date, getdate()) [days ago]
from sys.databases
where database_id > 5
order by create_date desc
),
temp_db as
(
select database_id, name, create_date, datediff(d, create_date, getdate()) [days ago]
from sys.databases
where database_id > 5
and name like '%_Temp'
),
range_db as
(
select min(database_id) [id], concat('# databases' ,count(*)) [desc], min(create_date) [cd], datediff(d, min(create_date), getdate()) [days ago]
from sys.databases
where database_id > 5
group by datediff(d, create_date, getdate())
)


select 'oldest ',*
from oldest_db
union
select 'newest ',*
from newest_db
union
select 'restoring ',*
from temp_db
union
select 'grouping ',*
from range_db



;


select min(create_date) [earliest date (UTC)]
     , max(create_date) [latest date (UTC)]
     , datediff(d, max(create_date), getdate()) [days ago]
     , coalesce((select name 
                from sys.databases 
                where name like '%_Temp'), 'None') [restoring]
     , (select string_agg(status,', ') 
       from
       (
       select concat(
               count(*), 
               ' refreshed ', 
               datediff(d, create_date, getdate()),
               ' days ago, took ',
               datediff(n, min(create_date),max(create_date)),
               ' minutes'
               ) [Status]
       from sys.databases
       where database_id > 5
       group by datediff(d, create_date, getdate())
       ) data ) [Status of database updates]
from sys.databases
where database_id > 5


select string_agg(status,', ') [Status of database updates]
from
(
select concat(
         count(*), 
         ' refreshed ', 
         datediff(d, create_date, getdate()),
         ' days ago, took ',
         datediff(n, min(create_date),max(create_date)),
         ' minutes'
         ) [Status]
from sys.databases
where database_id > 5
group by datediff(d, create_date, getdate())
) data


select
##cachebreaker?0##
from sys.databases
where database_id > 5

Enter Parameters

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