scadalts

How count save data per second in ScadaLTS


Create benchmark for the ScadaLTS, who checks how much data is stored in the database per second.

Create data source

enter image description here

Copy three times

enter image description here

And enable every data-source and data point.

And How count save data per second in ScadaLTS?


Solution

  • You can do this using SQL:

    select 
    count(*),
     YEAR(from_unixtime(ts/1000)),
            MONTH(from_unixtime(ts/1000)),
            DAY(from_unixtime(ts/1000)),
            hour(from_unixtime(ts/1000)),
            minute(from_unixtime(ts/1000)),
            second(from_unixtime(ts/1000))
    from pointValues 
    where
      YEAR(from_unixtime(ts/1000))  = YEAR(NOW()) and
      MONTH(from_unixtime(ts/1000))  = Month(NOW()) and
      DAY(from_unixtime(ts/1000))  = DAY(NOW())
    group by
        YEAR(from_unixtime(ts/1000)),
            MONTH(from_unixtime(ts/1000)),
            DAY(from_unixtime(ts/1000)),
            hour(from_unixtime(ts/1000)),
            minute(from_unixtime(ts/1000)),
            second(from_unixtime(ts/1000))
    Having count(*) >5
    order by count(*) DESC