User Guide > TDV Caching > Setting Up Caching > Setting Up the Parallel Cache Option
 
Setting Up the Parallel Cache Option
TDV provides a parallel caching option that is used to maximize performance of data caching. If cache loading performance gains cannot be realized using the TDV native loading option, you can try the TDV parallel option. This option uses statistics derived from a unique numeric key to create multiple partitions that can be used to load the data using parallel processes.
During parallel loading, the reader and writer work in parallel and are not blocked or waiting for one another. The reader reads the table rows into TDV memory and the writer pushes them into target database. You can have multiple readers and corresponding writers that work on different partitions simultaneously. These parallel threads use JDBC-based read write calls.
Requirements
This performance option is available as listed for the Native Cache Target Support column of the table in Supported Cache Target Storage Types.
It requires some setup beyond TDV configuration parameters. The parallel cache loading option requires that the view that you are caching has:
One or more user-defined or auto-inferred, simple or composite primary key of numeric or character type.
For numeric key columns, BOUNDARY cardinality statistics or DETAILED cardinality statistics are needed.
For character key columns, DETAILED cardinality statistics are needed.
Because partitioning is being determined on the key column, the cardinality statistics help determine how many unique partitions can be loaded in parallel. The number of unique partitions that can be found by the statistics collection determines how many threads can be used to load the data into the cache.
To configure the TDV parallel option for data caching
1. Open Studio.
2. Open a view in Studio that has had caching enabled.
3. Validate that your view has:
One or more user-defined or auto-inferred, simple or composite primary key of numeric or character type.
And that for the following special cases you have the required cardinality statistics:
For numeric key columns, BOUNDARY cardinality statistics or DETAILED cardinality statistics are required.
For character key columns, DETAILED cardinality statistics are required.
4. Follow the steps in Creating Cardinality Statistics for a View.
5. Save your work.
The next time your cache is refreshed, this cache loading option is attempted.