|From:||Andreas Kretschmer <akretschmer(at)spamfence(dot)net>|
|Subject:||Re: Why so slow?|
|Views:||Raw Message | Whole Thread | Download mbox|
Bealach-na Bo <bealach_na_bo(at)hotmail(dot)com> schrieb:
> The node table is tiny (2500 records). What I'm pulling my hair out
> over is that ANY Query, even something as simple as select count(*)
> form job_log takes of the order of tens of minutes to complete. Just
> now I'm trying to run an explain analyze on the above query, but so
> far, it's taken 35min! with no result and there is a postgres process at
> the top of top
> What am I doing wrong??
The 'explain analyse' don't return a result, but it returns the query
plan and importance details, how PG works.
That's why you should paste the query and the 'explain analyse' -
output. This is very important.
Anyway, do you periodical vacuum your DB? My guess: no, and that's why
you have many dead rows.
20:26 < akretschmer|home> ??vacuum
20:26 < rtfm_please> For information about vacuum
20:26 < rtfm_please> see http://developer.postgresql.org/~wieck/vacuum_cost/
20:26 < rtfm_please> or http://www.postgresql.org/docs/current/static/sql-vacuum.html
20:26 < rtfm_please> or http://www.varlena.com/varlena/GeneralBits/116.php
20:27 < akretschmer|home> ??explain
20:27 < rtfm_please> For information about explain
20:27 < rtfm_please> see http://techdocs.postgresql.org/oscon2005/robert.treat/OSCON_Explaining_Explain_Public.sxi
20:27 < rtfm_please> or http://www.gtsm.com/oscon2003/toc.html
20:27 < rtfm_please> or http://www.postgresql.org/docs/current/static/sql-explain.html
Read this links for more informations about vacuum and explain.
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknow)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°
|Next Message||Andrus||2006-04-27 18:44:49||CPU usage goes to 100%, query seems to ran forever|
|Previous Message||Bealach-na Bo||2006-04-27 18:12:01||Why so slow?|