Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
deepakqlikview_123
Specialist
Specialist

Buffer Load vs Cache load

Hello all,

Can you please tell me what is difference between buffer load and cache load.

Thanks

5 Replies
tresesco
MVP
MVP

Is ther something called Cache Load ? Where have you found that? I guess buffer load is sometimes referred as cache load, but there is nothing such keyword as Cache (If I am not greatly mistaken).

Not applicable

Hi,

I Never Heard about Cache Load


Buffer load:

With the BUFFER prefix, QVD files are created and maintained automatically (QVDs cache or buffer the result of the statement). This is handy while doing incremental load.

The QVD name is an internal one; 160 bit hex hash name comprising the entire the following load/select statement. It is stored in the location as set in the User Preferences > Locations.

e.g.

Buffer without option:

buffer select * from Table1;

Internally a QVD file is created and the content of Table1 is internally stored in the QVD. This would be used indefinitely until some other method is used.

buffer (incremental) load * from My Log.log;

Same as incremental load. It is a typical solution for log files (text). Not for DB files.

buffer (stale after 7 days) select * from Table1;

It overwrites the current QVD and make a full load after 7(n) days. It can be used with DB tables. This is the time stamp till the QVD would be used as source. After this it would be a full reload and regeneration of the QVD (?).

Buffer

QVD files can be created and maintained automatically via the buffer prefix. This prefix can be used on most Load and Select (SQL) statements in script. It indicates that QVD Files are used to cache/buffer the result of the statement.

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.

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) and is typically stored in the Application Data folder or another folder specified under User Preferences: Locations. 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 document that created it or when the document that created it no longer exists. This housekeeping can be turned off by checking the options Keep Unreferenced QVD Buffers in Document Properties: General (first requirement) and Keep Orphaned QVD Buffers in User Preferences (second requirement) property pages respectively, though the procedure cannot be generally recommended.

The syntax is:

buffer[ (option [ , option] ) ] ( load statement | select statement )

where:

option ::= incremental | expiry

expiry::= 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 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. Note that the incremental option can only be used with load statements and text files and that incremental load cannot be used where old data is changed or deleted!

The stale after option is typically used with DB sources where there is no simple timestamps on the original data. Instead one specifies 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.

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

Examples:

buffer select * from My Table;
buffer (stale after 7 days) select * from My Table;
buffer (incremental) load * from My Log.log;

Regards,

Damu

VishalWaghole
Specialist II
Specialist II

Hello Deepak,

I guess Cache Load functionality is not available in QlikView.

Buffer Load :-

Buffer load helps to create the QVD files automatically.  The created QVD will be maintained as defined in User Preferences Locations.

QVD files can be created and maintained automatically via the buffer prefix. This prefix can be used on most Load and Select (SQL) statements in script. It indicates that QVD Files are used to cache/buffer the result of the statement.

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.

Example: Buffer select * from text.csv

- Regards,

Vishal Waghole

deepakqlikview_123
Specialist
Specialist
Author

hello all,

Thanks for reply.

Can you please tell me where the QVD files saved exactly in buffer load moreover also tell me how to set QVD location

Thanks,

tresesco
MVP
MVP

By default get stored in application folder. To change it: Goto Settings>User Preference>Locations>QVD Buffers (Reset/Modify)