IMPORT_STATISTICS
Imports statistics from the XML file that was generated by EXPORT_STATISTICS
. Imported statistics override existing statistics for all projections of the table 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
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 that EXPORT_STATISTICS
saved.
=> 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)
See Also
ANALYZE_STATISTICS
DROP_STATISTICS
EXPORT_STATISTICS
- Collecting Statistics in the Administrator's Guide