Re: [PERFORM] Newbie question: ultra fast count(*)

2005-11-28 Thread Merlin Moncure
I have been reading all this technical talk about costs and such that I don't (_yet_) understand. Now I'm scared... what's the fastest way to do an equivalent of count(*) on a table to know how many items it has? Make sure to analyze the database frequently and check pg_class for reltuples

Re: [PERFORM] Hardware/OS recommendations for large databases (

2005-11-28 Thread Merlin Moncure
It certainly makes quite a difference as I measure it: doing select(1) from a 181000 page table (completely uncached) on my PIII: 8.0 : 32 s 8.1 : 25 s Note that the 'fastcount()' function takes 21 s in both cases - so all the improvement seems to be from the count overhead

Re: [PERFORM] Hardware/OS recommendations for large databases (

2005-11-28 Thread Mark Kirkwood
Merlin Moncure wrote: It certainly makes quite a difference as I measure it: doing select(1) from a 181000 page table (completely uncached) on my PIII: 8.0 : 32 s 8.1 : 25 s Note that the 'fastcount()' function takes 21 s in both cases - so all the improvement seems to be from the count

[PERFORM] Please help with this explain analyse...

2005-11-28 Thread David Gagnon
Hi all, I don't understand why this request take so long. Maybe I read the analyse correctly but It seem that the first line(Nested Loop Left Join ...) take all the time. But I don't understand where the performance problem is ??? All the time is passed in the first line ... Thanks for

Re: [PERFORM] Hardware/OS recommendations for large databases (

2005-11-28 Thread Brendan Duddridge
Forgive my ignorance, but what is MPP? Is that part of Bizgres? Is it possible to upgrade from Postgres 8.1 to Bizgres? Thanks, Brendan Duddridge | CTO | 403-277-5591 x24 | [EMAIL PROTECTED] ClickSpace Interactive Inc.

Re: [PERFORM] Please help with this explain analyse...

2005-11-28 Thread Bricklen Anderson
David Gagnon wrote: - Index Scan using cr_pk on cr (cost=0.00..6.02 rows=1 width=828) (actual time=0.073..0.077 rows=1 loops=13587) Index Cond: (((cr.crypnum)::text = 'M'::text) AND (cr.crnum = outer.cscrnum)) Filter: ((crdate +

Re: [PERFORM] Please help with this explain analyse...

2005-11-28 Thread Tom Lane
Bricklen Anderson [EMAIL PROTECTED] writes: Your loops are what is causing the time spent. eg. actual time=0.127..17.379 rows=1154 loops=8335) == 8335*(17.379-0.127)/1000=143 secs (if my math is correct). As for where the problem is, I think it's the horrid misestimate of the number of

Re: [PERFORM] Hardware/OS recommendations for large databases (

2005-11-28 Thread David Boreham
Brendan Duddridge wrote: Thanks for your reply. So how is that different than something like Slony2 or pgcluster with multi-master replication? Is it similar technology? We're currently looking for a good clustering solution that will work on our Apple Xserves and Xserve RAIDs. I think

Re: [PERFORM] Hardware/OS recommendations for large databases (

2005-11-28 Thread David Lang
On Mon, 28 Nov 2005, Brendan Duddridge wrote: Hi David, Thanks for your reply. So how is that different than something like Slony2 or pgcluster with multi-master replication? Is it similar technology? We're currently looking for a good clustering solution that will work on our Apple Xserves