HDFql Reference Manual v2.6.0

6.7.35SHOW CACHE

Syntax

SHOW [[USE] FILE | DATASET] CACHE [SLOTS | SIZE | PREEMPTION]

[post_processing_option]

[output_redirecting_option]

Description

Show (i.e. get) the cache parameter values for accessing HDF5 files or datasets. If none of the keywords FILE, USE FILE, or DATASET is specified, the cache parameters returned refer to files by default (optionally, the keyword FILE may be specified to make the purpose of this operation clearer). To explicitly return the cache parameters of the file currently in use or of datasets, the keyword USE FILE or DATASET must be specified, respectively. If none of the keywords SLOTS, SIZE, or PREEMPTION is specified, all cache parameter values (i.e. for slots, size, and preemption) are returned. To return a specific cache parameter value, the keyword SLOTS, SIZE, or PREEMPTION must be specified.

Parameter(s)

post_processing_option – optional option that transforms the result set according to the programmer’s needs, such as ordering or truncating (please refer to the section PROCESSING for additional information).

output_redirecting_option – optional option that specifies the cursor in use, an HDF5 object (i.e. dataset or attribute), a (text, binary, or Excel) file, or memory (i.e. user-defined variable) to write the result set into (please refer to the subsection INTO for additional information). If not specified, the cursor in use is populated with the result set instead (please refer to the chapter CURSOR for additional information).

Return

The cache parameter values for accessing HDF5 files or datasets as an HDFQL_COMPOUND (when returning all cache parameter values), HDFQL_BIGINT (when returning only the slots or size cache parameter value), or HDFQL_DOUBLE (when returning only the preemption cache parameter value).

Example(s)

# show (i.e. get) cache parameter values for accessing HDF5 files (should return 521, 1048576, 0.75)
SHOW CACHE

# show (i.e. get) cache preemption value for accessing HDF5 files (should return 0.75) 
SHOW CACHE PREEMPTION 

# show (i.e. get) cache parameter values for accessing HDF5 files (should return 521, 1048576, 0.75)
SHOW FILE CACHE 

# show (i.e. get) cache slots value for accessing HDF5 datasets (should return 521)
SHOW DATASET CACHE SLOTS 

# use (i.e. open) an HDF5 file named "my_file0.h5" with cache slots, size, and preemption values of 521, 1048576, and 0.75, respectively
USE FILE my_file0.h5

# show (i.e. get) cache parameter values for accessing the HDF5 file currently in use (should return 521, 1048576, 0.75)
SHOW USE FILE CACHE 

# use (i.e. open) an HDF5 file named "my_file1.h5" with cache slots, size, and preemption values of 1523, 262144, and 0.6, respectively
USE FILE my_file1.h5 CACHE SLOTS 1523 SIZE 262144 PREEMPTION 0.6 

# show (i.e. get) cache parameter values for accessing the HDF5 file currently in use (should return 1523, 262144, 0.6)
SHOW USE FILE CACHE 

# use (i.e. open) an HDF5 file named "my_file2.h5" with a cache preemption value of 0.9 
USE FILE my_file2.h5 CACHE PREEMPTION 0.9 

# show (i.e. get) cache parameter values for accessing the HDF5 file currently in use (should return 521, 1048576, 0.9)
SHOW USE FILE CACHE