Zu Hauptinhalt springen


QVD-Dateien können mit Hilfe des buffer-Zusatzes im Skript automatisch generiert werden. Dieser Zusatz kann zusammen mit den meisten LOAD- und SELECT-Befehlen verwendet werden. Er dient dazu, die eingelesenen Daten in einer QVD-Datei zu cachen bzw. zu buffern.


Buffer [(option [ , option])] ( loadstatement | selectstatement )

option::= incremental | stale [after] amount [(days | hours)]

If no option is used, the QVD buffer created by the first execution of the script will be used indefinitely.

The name of the QVD file is a calculated name, a 160-bit hexadecimal hash of the entire following LOAD or SELECT statement and other discriminating info. This means that the QVD buffer will be rendered invalid by any change in the following LOAD or SELECT statement.

QVD buffers will normally be removed when no longer referenced anywhere throughout a complete script execution in the app that created it or when the app that created it no longer exists.


Argument Description

The incremental option enables the ability to read only part of an underlying file. Previous size of the file is stored in the XML header in the QVD file. This is particularly useful with log files. All records loaded at a previous occasion are read from the QVD file whereas the following new records are read from the original source and finally an updated QVD-file is created.

The incremental option can only be used with LOAD statements and text files. Incremental load cannot be used where old data is changed or deleted.

stale [after] amount [(days | hours)] amount is a number specifying the time period. Decimals may be used. The unit is assumed to be days if omitted.

The stale after option is typically used with DB sources where there is no simple timestamp on the original data. Instead you specify how old the QVD snapshot can be to be used. A stale after clause simply states a time period from the creation time of the QVD buffer after which it will no longer be considered valid. Before that time the QVD buffer will be used as source for data and after that the original data source will be used. The QVD buffer file will then automatically be updated and a new period starts.


Numerous limitations exist, most notable is that there must be either a file LOAD or a SELECT statement at the core of any complex statement.

Beispiel 1:  

Buffer SELECT * from MyTable;

Beispiel 2:  

Buffer (stale after 7 days) SELECT * from MyTable;

Beispiel 3:  

Buffer (incremental) LOAD * from MyLog.log;

Hat diese Seite Ihnen geholfen?

Wenn Sie Probleme mit dieser Seite oder ihren Inhalten feststellen – einen Tippfehler, einen fehlenden Schritt oder einen technischen Fehler –, teilen Sie uns bitte mit, wie wir uns verbessern können!