A non-version time series database is a database, which stores only actual time series data and metadata. Such time series database has no information about changes in series data and metadata, which were previously made.
TIP. How to understand whether a time series database is version or non-version?
Time series database is version, if its properties on the Attributes page contains the Keep Version History checkbox selected. The checkbox is selected by default, it can be deselected only when creating a time series database.
If the time series database was created in Prognoz Platform 8.1 or earlier, it can be sped up due to system index optimization. To execute optimization, use the IRubricator.AlterAndSave method.
NOTE. If a non-version time series database was created in Prognoz Platform 8.2 or later, its system indexes are already optimized for maximum performance.
Executing the example requires that the repository contains a non-version time series database with the TSDB identifier created in Prognoz Platform 8.1 or earlier.
Add links to the Cubes, Metabase system assemblies.
Sub UserProc;
Var
mb: IMetabase;
TSDB: IRubricator;
Begin
// Get time series database
mb := MetabaseClass.Active;
TSDB := mb.ItemById("TSDB").Edit As IRubricator;
// Check if database is a version one
If Not TSDB.KeepHistory Then
// If time series database
// is a non-version one, optimize it
TSDB.AlterAndSave;
End If;
End Sub UserProc;
After executing the example system indexes of time series database are optimized.
The requirements and result of the Fore.NET example execution match with that in the Fore example.
Imports Prognoz.Platform.Interop.Cubes;
…
Public Shared Sub Main(Params: StartParams);
Var
mb: IMetabase;
TSDB: IRubricator;
Begin
// Get time series database
mb := Params.Metabase;
TSDB := mb.ItemById["TSDB"].Edit() As IRubricator;
// Check if database is a version one
If Not TSDB.KeepHistory Then
// If time series database
// is a non-version one, optimize it
TSDB.AlterAndSave();
End If;
End Sub
See also: