| От | Tom Lane |
|---|---|
| Тема | Re: reltuples < # of rows |
| Дата | |
| Msg-id | 20693.1109182721@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | reltuples < # of rows (Eric Brown <eric.brown@propel.com>) |
| Список | pgsql-general |
Eric Brown <eric.brown@propel.com> writes:
> I thought that the number of tuples in a table must be greater than the
> number of rows? For one of my tables, I have the following:
> # analyze t_stats;
> ANALYZE
> siteserverdb=# select reltuples, relpages from pg_class where relname =
> 't_stats';
> reltuples | relpages
> -----------+----------
> 1760 | 21119
> (1 row)
> siteserverdb=# select count(*) from t_stats;
> count
> -------
> 1861
> (1 row)
> How is this possible?
ANALYZE produces only an estimated reltuples. To be exact it would have
to scan the entire table.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера