KB-110460: Calculating space used by Elipse E3 Historic in the database.


How can I gauge the space capacity (in MB) used by Historic objects in the database required for an Elipse E3 application?


The capacity of the database required for an Elipse E3 application with Historic objects can be gauged when we know the type of data being recorded in the table, as well as the period it’s been recorded.

An integer, for example, is 4-byte long; if one is recorded every 10 minutes, in one hour it will have allotted 24bytes.

For an average estimate, you must: check the datatype in the fields, add the number of bytes, and then multiply this sum by the number of expected records. However, in order to get a precise estimate, you must put it to practice; that is, you must create a historic, fill it with an “x” amount of records, and then check the size it occupies in the SQL table.

The historic records the following datatypes:

  • DateTime: 8 bytes
  • Integer: 4 bytes
  • Double: 8 bytes
  • Text: 1 byte per character (the allotted size is always the one that was set up in the text field, even if the recorded text is smaller).

Follow the calculation in the example below:

  1. TabHist table has 9 fields: 8 integers and 1 datetime.
  2. We then let the historic record one register per second in the next 5241 seconds.
  3. The approximate size per row would be 40 bytes, on average.

4 x 8 = 32
1 x 8 = 8
40 bytes x 5241 registers = 209640 or 0,209 MB

At the database’s configuration, the Data Space field displays a value of 0,273 MB; this is therefore very close to the value returned in the calculation above.

The same calculation applies to the Alarms table, or to any other recorded by Elipse E3, because it doesn’t work by sweeping when recording; this will keep us from having a calculation of registers numbers for a period of time.

Este artigo foi útil? Was this post helpful?

Leave a Reply

Your email address will not be published.Required fields are marked *