Copy schema statistics

Moderator: NorbertKrupa

Post Reply
shaz001
Newbie
Newbie
Posts: 13
Joined: Mon Jan 13, 2014 1:08 am

Copy schema statistics

Post by shaz001 » Mon Apr 14, 2014 2:15 am

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

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: Copy schema statistics

Post by id10t » Mon Apr 14, 2014 3:18 am

Hi!

[DELETED]
Last edited by id10t on Wed May 06, 2015 5:36 pm, edited 1 time in total.

NorbertKrupa
GURU
GURU
Posts: 527
Joined: Tue Oct 22, 2013 9:36 pm
Location: Chicago, IL
Contact:

Re: Copy schema statistics

Post by NorbertKrupa » Mon Apr 14, 2014 3:33 am

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.

User avatar
nnani
Master
Master
Posts: 302
Joined: Fri Apr 13, 2012 6:28 am
Contact:

Re: Copy schema statistics

Post by nnani » Mon Apr 14, 2014 8:42 am

Hi,

Regarding Export Statistics
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).
If you wish to generate this for schema, then you can try this.

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.
nnani........
Long way to go

You can check out my blogs at vertica-howto

NorbertKrupa
GURU
GURU
Posts: 527
Joined: Tue Oct 22, 2013 9:36 pm
Location: Chicago, IL
Contact:

Re: Copy schema statistics

Post by NorbertKrupa » Mon Apr 14, 2014 2:10 pm

It appears as though the ability to specify an object is introduced in 6.1.
Checkout vertica.tips for more Vertica resources.

shaz001
Newbie
Newbie
Posts: 13
Joined: Mon Jan 13, 2014 1:08 am

Re: Copy schema statistics

Post by shaz001 » Mon Apr 14, 2014 5:39 pm

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.

Post Reply

Return to “Vertica Database Administration”