pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedrowcount for all tables
2+ messages / 2 participants
[nested] [flat]
* rowcount for all tables
@ 2006-03-17 13:39 Stefan Meyer <st.meyer@mdsi.de>
2006-03-19 04:56 ` Re: rowcount for all tables Bruno Wolff III <bruno@wolff.to>
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Meyer @ 2006-03-17 13:39 UTC (permalink / raw)
To: pgsql-sql
i have a beginner question and i have read the FAQs.
is there a faster ways than
select count(*) from foo;
to get the rowcount for the tables in my db ?
Stefan
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: rowcount for all tables
2006-03-17 13:39 rowcount for all tables Stefan Meyer <st.meyer@mdsi.de>
@ 2006-03-19 04:56 ` Bruno Wolff III <bruno@wolff.to>
0 siblings, 0 replies; 2+ messages in thread
From: Bruno Wolff III @ 2006-03-19 04:56 UTC (permalink / raw)
To: Stefan Meyer <st.meyer@mdsi.de>; +Cc: pgsql-sql
On Fri, Mar 17, 2006 at 14:39:04 +0100,
Stefan Meyer <st.meyer@mdsi.de> wrote:
> i have a beginner question and i have read the FAQs.
> is there a faster ways than
>
> select count(*) from foo;
>
> to get the rowcount for the tables in my db ?
There are some ways to get approximate counts that won't require scanning
the whole table.
If you are going to be doing lots of these, you can use triggers to
maintain a count. There is also a more complicated approach that can be
used to reduce contention. You should be able to find more details in
the archives.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2006-03-19 04:56 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-03-17 13:39 rowcount for all tables Stefan Meyer <st.meyer@mdsi.de>
2006-03-19 04:56 ` Bruno Wolff III <bruno@wolff.to>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox