Export and import of statistics data

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Export and import of statistics data

Holger Jakobs-2
Hi everybody,

Is there a way of exporting statistics data from a database cluster
containing a lot of rows and import them into a similar structured, but
small database cluster.

The purpose of this is testing and comparing execution plans on a small
machine. Of course executing the statement wouldn't make much sense, so
I would use only EXPLAIN, not EXPLAIN ANALYZE.

Due to data protection and capacity it's not possible to copy the
production database or even access it.

Thanks and best regards

Holger

--
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012



OpenPGP_signature (209 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Export and import of statistics data

Tom Lane-2
Holger Jakobs <[hidden email]> writes:
> Is there a way of exporting statistics data from a database cluster
> containing a lot of rows and import them into a similar structured, but
> small database cluster.

Not at present, AFAIK.  There have been discussions of creating a
way to do that, and I know of at least one non-public tool that
does it, but nobody's pushed things to the point of having code
the community would accept.

The key stumbling block is inventing a dump representation that
would have realistic prospects of still being importable if/when
we change the contents of pg_statistic.  Certainly there are a
lot of applications where cross-version compatibility isn't a
requirement; but I don't think the community would take code that
isn't usable by pg_upgrade, and for that you need an upgradable
design.

                        regards, tom lane