Hi,
How to copy a schema statistics to other Vertica db? There is a command "export_statistics" but I don't see an option there for schema.
Version: 6.1.2
Regards,
Shazor
Copy schema statistics
Moderator: NorbertKrupa
Re: Copy schema statistics
Hi!
[DELETED]
[DELETED]
Last edited by id10t on Wed May 06, 2015 5:36 pm, edited 1 time in total.
-
- GURU
- Posts: 527
- Joined: Tue Oct 22, 2013 9:36 pm
- Location: Chicago, IL
- Contact:
Re: Copy schema statistics
Are you asking about the statistics generated based on the data? I don't think that's something that is exportable considering the data could change.
Checkout vertica.tips for more Vertica resources.
Re: Copy schema statistics
Hi,
Regarding Export Statistics
1. Generate statistics xml file for every table in that schema
2. Concatenate all the xml file in same sequence using shell scripting/Linux commands
The whole thing can be done in a shell script for each table in schema.
Hope this helps.
Regarding Export Statistics
If you wish to generate this for schema, then you can try this.Generates an XML file that contains statistics for the database. You can optionally export statistics on a single database object (table, projection, or table column).
1. Generate statistics xml file for every table in that schema
2. Concatenate all the xml file in same sequence using shell scripting/Linux commands
The whole thing can be done in a shell script for each table in schema.
Hope this helps.
-
- GURU
- Posts: 527
- Joined: Tue Oct 22, 2013 9:36 pm
- Location: Chicago, IL
- Contact:
Re: Copy schema statistics
It appears as though the ability to specify an object is introduced in 6.1.
Checkout vertica.tips for more Vertica resources.
Re: Copy schema statistics
Could you provide an example of the script or commands that can be used to Generate statistics xml file for every table in that schema?
nnani wrote:1. Generate statistics xml file for every table in that schema
2. Concatenate all the xml file in same sequence using shell scripting/Linux commands
The whole thing can be done in a shell script for each table in schema.