How to specify/mock the statistic data of tables in PostgreSQL
В списке pgsql-general по дате отправления:
| От | ygnhzeus |
|---|---|
| Тема | How to specify/mock the statistic data of tables in PostgreSQL |
| Дата | |
| Msg-id | 52CFB699.2030609@gmail.com обсуждение исходный текст |
| Ответы |
Re: How to specify/mock the statistic data of tables in PostgreSQL
|
| Список | 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!
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера