Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Column NameData TypeNotes
tagidintUnique id of the Tag.
References sqlth_te.
intvalueintHolds the value of the Tag if it is datatype 0, NULL otherwise.
floatvaluedoubleHolds the value of the Tag if it is datatype 1, NULL otherwise.
stringvaluestringHolds the value of the Tag if it is datatype 2, NULL otherwise.
datevaluedateHolds the value of the Tag if it is datatype 3, NULL otherwise.
dataintegrityintQuality of the Tag for this timestamp. 192 is Good Quality, anything else is bad. See Tag Quality Overlays
t_stamplongUnix Timestamp (milliseconds since epoc) for this value.


sqlth_drv

This table stores information about the provider that is driving the Historical Tagsdefines the historical providers that are storing data to the database.

Column NameData TypeNotes
idintUnique id of the driver.
namestringName of the driver. This is usually the project name.
providerstring

Name of the Tag provider.


sqlth_partitions

This table stores a list of all partition tables and the start/end dates for each. Use this table to determine which sqlt_data_x_x_x tables fit your time rangedefines the "partitions" (tables) that are used to store data, and what time frames they cover. Partitioning in the history system splits data across multiple tables in a way that is compatible with all database systems, making certain maintenance tasks easier. The query system does not expect any particular partition configuration, it simply consults this table for table-to-time associations, and then queries the resulting tables for data.

Column NameData TypeNotes
pnamestringTable name for partitioningThe name of the table that contains this partition's data.
drvidintThe id of the driver that owns this partition is using.data table. Partitions are created per driver to keep data separate.
References sqlth_drv.
start_timelong

Unix Timestamp (milliseconds since epoc) for when the earliest time covered by this partition was created.

end_timelong

Unix Timestamp (milliseconds since epoc) for when the end time covered by this partition ends.

blocksizeintSize of the block.The size, in milliseconds, of time covered by each entry. This is used by "pre-processed" partitions and would be 0 for normal data partitions.
flagsintAn int that holds boolean flags for partition settings. Often NULL.Additional flags that affect how the partition is used.
1 = No seed query support. The system will not execute "bounding value" (or "seed") queries against the table. Useful for database engines that do not support indexing (such as MySQL Archive engine), as these operations can become very time intensive.


sqlth_sce

This table stores the start/end times and rates for how often the Tags are storedA record of executions of scan classes, defined in sqlth_scinfo. This table is primarily used to determine when the system was running correctly. The end_time of an entry is updated, as long as it falls within 2*rate of the last execution. If not, a new entry is made, and data queried will be "stale" during the gap.

Column NameData TypeNotes
scidintId of the scan class execution entry.
References sqlth_scinfo
start_timelong

Unix Timestamp (milliseconds since epoc) for when the first execution of this scan class was created.

end_timelong

Unix Timestamp (milliseconds since epoc) for when the latest execution of this scan class ends.

rateint

The rate (in milliseconds) of execution. There are no entries for the 'Execute on Value Change' option.


sqlth_scinfo

This table stores the definitions of the scan classesdefining scan class information for executing Historical Tags.

Column NameData TypeNotes
idintUnique id of the Scan class.
scnamestringName of the scan class. "_exempt_" for 'Execute on Value Change' option.
drvidint

The driver this scan class uses.
References sqlth_drv.

...