IMPORT_STATISTICS
Imports statistics from the XML file that was generated by EXPORT_STATISTICS
. Imported statistics override existing statistics for the projections that are referenced in the XML file.
Syntax
IMPORT_STATISTICS ( 'filename' )
Parameters
filename |
The path and name of an XML input file that was generated by |
Privileges
Superuser
Restrictions
IMPORT_STATISTICS
imports only valid statistics. If the source XML file has invalid statistics for a specific column, those statistics are not imported and Vertica throws a warning. If the statistics file has an invalid structure, the import operation fails. To check a statistics file for validity, runVALIDATE_STATISTICS
.IMPORT_STATISTICS
returns warnings for LONG data type columns, as the source XML file generated byEXPORT_STATISTICS
contains no statistics for columns of that type.
Example
Import the statistics for the VMart database from an XML file previously created by EXPORT_STATISTICS
:
=> SELECT IMPORT_STATISTICS('/opt/vertica/examples/VMart_Schema/vmart_stats.xml'); IMPORT_STATISTICS ---------------------------------------------------------------------------- Importing statistics for projection date_dimension_super column date_key failure (stats did not contain row counts)
Importing statistics for projection date_dimension_super column date failure (stats did not contain row counts)
Importing statistics for projection date_dimension_super column full_date_description failure (stats did not contain row counts)
...
(1 row)