Uploaded image for project: 'Solution Center'
  1. Solution Center
  2. SOL-373

How to calculate the backup duration from the system events table

    XMLWordPrintable

    Details

    • Type: How To
    • Status: Published
    • Affects Version/s: EXASolution 5.0
    • Fix Version/s: None
    • Component/s: EXASolution
    • Labels:
      None
    • Solution:
      Hide
      with intermediate as
      (
          select s.*
          , lead(event_type) over (order by measure_time)  end_event
          , lead(measure_time) over (order by measure_time)  end_time
      from
          exa_system_events s
      where
          event_type like 'BACKUP%'
      )
      select
          i.*
          , cast(trunc(measure_time, 'DD') as date) start_date
          , cast(round(minutes_between(end_time, measure_time)/60, 2) as decimal(10,2)) backup_duration
      from
          intermediate i
      where
          event_type = 'BACKUP_START' and end_event not like '%START'
          and measure_time > trunc(now(), 'YYYY')
      order by
          measure_time desc;
      
      Show
      with intermediate as ( select s.* , lead(event_type) over ( order by measure_time) end_event , lead(measure_time) over ( order by measure_time) end_time from exa_system_events s where event_type like ' BACKUP %' ) select i.* , cast (trunc(measure_time, 'DD' ) as date ) start_date , cast (round(minutes_between(end_time, measure_time)/60, 2) as decimal (10,2)) backup_duration from intermediate i where event_type = 'BACKUP_START' and end_event not like '% START ' and measure_time > trunc(now(), 'YYYY' ) order by measure_time desc ;
    • Category 1:
      Database Administration
    • Category 2:
      Cluster Administration - Backup

      Attachments

        Issue Links

          Activity

            People

            • Assignee:
              CaptainEXA Captain EXASOL
              Reporter:
              CaptainEXA Captain EXASOL
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: