Re: [PERFORM] gah! sudden slowdown??

2005-02-25 Thread Steinar H. Gunderson
On Fri, Feb 25, 2005 at 03:41:58PM +0800, SpaceBallOne wrote:
> Our dual opteron has been performing well for many weeks now (after some
> simple tuning) when all of a sudden the queries have slowed right down!

Are you running regular VACUUMs? Looks like you have a lot of dead rows or
something.

/* Steinar */
-- 
Homepage: http://www.sesse.net/

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


[PERFORM] gah! sudden slowdown??

2005-02-24 Thread SpaceBallOne



Our dual opteron has been performing well for many 
weeks now (after some simple tuning) when all of a sudden the queries have 
slowed right down!ie:
 
DUAL 246 OPTERON:
 
select count(*) from job_archieve; - Time: 107.24 ms
 
explain analyse select count(*) from 
job_archieve;Aggregate  (cost=2820.50..2820.50 rows=1 width=0) (actual 
time=153.53..153.53 rows=1 loops=1)   ->  Seq Scan on 
job_archieve  (cost=0.00..2789.20 rows=12520 width=0) (actual 
time=1.39..132.98 rows=12520 loops=1) Total runtime: 153.74 
msecTime: 156.94 ms
 
 
 
CRAPPY AMD ATHLON XP 1700+:
 
select count(*) from job_archieve; - Time: 23.30 ms
 
explain analyse select count(*) from 
job_archieve;
Aggregate  (cost=2816.50..2816.50 rows=1 
width=0) (actual time=133.83..133.84 rows=1 loops=1)   ->  
Seq Scan on job_archieve  (cost=0.00..2785.20 rows=12520 width=0) (actual 
time=0.02..72.64 rows=12520 loops=1) Total runtime: 133.92 
msecTime: 134.79 ms
 
 
 
 
 
The ratio of these simple query times is about 
accurate for most queries performed on the same database on the different 
machines... Any ideas what may have suddenly caused this and where to start 
troubleshooting??? Both dbs have already been fully vacuumed.
 
The opteron is going to get a overhaul (4 port raid 
going in, fresh install of freebsd, postgres etc) but would be handy to know for 
future reference in case this happens again
 
(ps, yes i know archive is not spelt archieve 
;)
 
Cheers!Dave.