0 / 0
Collecting statistics for flat files not in object storage
Last updated: Nov 26, 2024
Collecting statistics for flat files in Data Virtualization

You can use the SYSPROC.NNSTAT procedure to collect statistics for all virtualized objects except those that are defined in object storage.

Important: Do not use the SYSPROC.NNSTAT procedure (a catalog-based statistics collection method) on a virtualized table. This approach deletes any previously collected column-level statistics, which has an adverse impact on query performance.

The following example shows you how to call the SYSPROC.NNSTAT procedure to collect statistics.

call SYSPROC.NNSTAT(NULL, 'schema', 'table_name', 'list_of_columns_commonly_used_in_predicates', '', 2, '/tmp/table_name.log', ?, 1);

This call collects table-level statistics and column-level statistics for the columns that are included in the list_of_columns_commonly_used_in_predicates argument. If the table has a small number of columns, you can collect statistics for all columns in the table by specifying the null value instead of a column list. To avoid collecting column statistics, specify the empty string ('') instead.

For more information, see the SYSPROC.NNSTAT stored procedure.

Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more