Collecting statistics on virtualized tables over flat files that are not in object storage might fail
Data
Virtualization might hang when you use the COLLECT_STATISTICS
procedure to collect statistics for a virtualized table over a flat file that is not in object
storage.
Symptoms
Statistics collection can be resource-intensive and take a long time to complete if the
virtualized table has many rows or statistics are gathered for many columns. However, a hang might
occur when you use the COLLECT_STATISTICS procedure to collect statistics for a
virtualized table over a flat file that is not in object storage.
Resolving the problem
You can resolve this problem so that statistics can be successfully collected by using one of the following methods.
- Before you run
COLLECT_STATISTICS, run a simpleSELECTstatement against the table. - Instead of using the
COLLECT_STATISTICSprocedure to collect statistics, use theSYSPROC.NNSTATstored procedure. For more information, see SYSPROC.NNSTAT stored procedure.
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.