Re: PL/PgSQL for counting all rows in all tables.

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: PL/PgSQL for counting all rows in all tables.
Дата
Msg-id E7F85A1B5FF8D44C8A1AF6885BC9A0E4306B33@ratbert.vale-housing.co.uk
обсуждение исходный текст
Ответ на PL/PgSQL for counting all rows in all tables.  (David Fetter <david@fetter.org>)
Список pgsql-hackers

> -----Original Message-----
> From: Robert Treat [mailto:xzilla@users.sourceforge.net]
> Sent: 12 October 2004 21:21
> To: Dave Page
> Cc: pgsql-hackers@postgresql.org
> Subject: Re: [HACKERS] PL/PgSQL for counting all rows in all tables.
>
> Maybe I didn't phrase that quite right. How would a user know
> that he needs to do a real count?  For example, if I have a
> table with est 1 million rows, and I load another 1 million
> rows into it, wont pgadmin show me 1 million rows until I run
> an analyze? Even if I run a manual count, wont it show 1
> million next time I come into the application, and that time
> I may not realize that the table is off by 1 million rows so
> I take the estimated count at face value.

Yeah, that's exactly what can happen. If it makes you feel any better
about doing it in phppgadmin, then we never got any complaints about it!

We simply rely on the fact that it's labelled as an estimate. I can't
see that there's any other way around it that doesn't require running a
potentially very expensive ANALYZE to update the stats.

Regards, Dave


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: Question about Parser()
Следующее
От: Neil Conway
Дата:
Сообщение: Re: plans for bitmap indexes?