From: | "ygnhzeus" <ygnhzeus(at)gmail(dot)com> |
---|---|
To: | "pgsql-general" <pgsql-general(at)postgresql(dot)org> |
Subject: | How to specify/mock the statistic data of tables in PostgreSQL |
Date: | 2014-01-10 09:00:29 |
Message-ID: | 52CFB699.2030609@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi all,
I want to use PostgreSQL to help me calculate the cardinality/selectivity of some queries, but I do not want to insert any data into these tables(since the data size is huge) to PostgreSQL. So I plan to calculate the statistic data by myself (not in PostgreSQL) and manually specify the metrics (maybe by modifying pg_statistic table) in PostgreSQL, thus PG's optimizer may use these statistic to evaluate the query (Explain...). Here comes the problem:
1. Is it possible to do what I've described above?
2. I've took a look at the pg_statistic table and pg_stats view, in the view I saw that most_common_elems/most_common_elem_freqs/elem_count_histogram were empty, and I'm also a little confused about the column called correlation. Is there any detailed document about how these metrics are calculated in PostgreSQL?
Thanks!
From | Date | Subject | |
---|---|---|---|
Next Message | Luca Ferrari | 2014-01-10 09:01:42 | Re: wal archive peak during pg_dump |
Previous Message | Sameer Kumar | 2014-01-10 08:42:28 | Re: argument of CASE/WHEN must not return a set |