rowcount for all tables
rowcount for all tables
От:
Stefan Meyer <st.meyer@mdsi.de>
Дата:
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
Re: rowcount for all tables
От:
Bruno Wolff III <bruno@wolff.to>
Дата:
On Fri, Mar 17, 2006 at 14:39:04 +0100, Stefan Meyer 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.