Data Historian Performance Benchmarks

DB Engines Compared

In an effort to help you decide which database engine to choose in your implementation, and how you can boost performance with an existing OAS configuration, we’ve performed extensive testing. On each of the database engines listed, we configured our Data Historian to log Tag Data in 3 different ways.

Narrow
In this configuration, a single value is written per table along with a timestamp for the logged value. This means each OAS Tag logged will result in a single database table.

Wide 10
Each table contains 10 OAS Tags arranged in a single row for each given timestamp. In this test we logged 10 OAS Tag values in a single table.

Wide 990
Using the same configuration as Wide 10, but logging 990 OAS Tags per timestamp.

Conclusions

From our testing, we’ve determined that the fastest overall DB engine is Microsoft SQL Server, even though it performed only slightly slower in the Narrow table test than the next fastest engine Oracle. But because of its dramatically superior performance in all other tests (>2M values per second!), we recommend using MS SQL Server for data logging where possible. Oracle and mySQL are the next fastest engines, and have similar performance numbers to each other, but are also extremely quick when using a Wide logging format.

Efficiency is boosted with logging multiple values per table in the Wide formats, and the fastest speeds can be achieved when increasing the number of values per record. Yet, because we log to an open format, you can still perform post-processing or data archiving that transforms this wide format into a normalized configuration for your own internal usage, while still getting the benefits of high-speed logging.

Data is not logged to the database engine

View the Data Logging Errors troubleshooting guide for a complete list of error causes and solutions.

View the source of the problem under Configure-System Errors.

The complete history of errors can be viewed under C:\Program Files\Open Automation Software\OAS\Log or the path that is set under Configure-Options-System Logging.

Enable Log Data Logging Transactions under Configure-Options-System Logging to see the details of each transaction and error returned from the database engine.

I need to log to an Oracle database engine using the TNSNAMES.ORA file.

OAS version 12.00.0043 now uses OracleManagedDataAccess assembly which does not support TNSNAMES.ORA.  You can set the entire path from the TNSNAMES.ORA file in the Database field of the data logging, alarm logging, or recipe group directly.

Use the following as the Database name:

(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=MyOracleSID)))

As example for a system with a computer name GWDESK and the Oracle database name OPCDb:

(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=GWDESK)(PORT = 1521)))(CONNECT_DATA=(SERVER= DEDICATED)(SERVICE_NAME=OPCDb)))

How much memory on the hard disk is taken up when logging to SQL Server?

The following should be used as an aid in sizing database requirements.

The method used is to store 100 Tags each, of a few common data types for one hour at a 1 second continuous interval to separate tables. SQL Server 2005 Express was used to gather this information.

As always your final results may vary.

In SQL Server you can set the Database property under Options for Recovery model to Simple to reduce disk usage.

Boolean Data type table size

Rows: 3598

Reserved: 200 KB

Data: 152 KB

Index Size: 16 KB

Unused: 32 KB

Double data type table size

Rows: 3598

Reserved: 3272 KB

Data: 3200 KB

Index Size: 16 KB

Unused: 56 KB

Integer data type table size

Rows: 3598

Reserved: 1672 KB

Data: 1600 KB

Index Size: 16 KB

Unused: 56 KB

String data type table size (100 char / tag)

Rows: 3589

Reserved: 84752 KB

Data: 84552 KB

Index Size: 144 KB

Unused: 56 KB