467,145 Members | 944 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,145 developers. It's quick & easy.

Postgres slow after a couple of days

Hi,

A few days ago i've installed PostgreSQL 7.4.1
After the installation, Postgres was very fast.
But now, a few days later, it getting slower and slower.

I've looked in the data-dir and i was confused when i see the big
size from that directory.

A dump (created with pg_dump) is about 1MB.

pauli# cd /usr/local/pgsql/data
epauli# du -h
4.4M ./base/1
4.4M ./base/17141
19M ./base/17142
4.4M ./base/17143
4.4M ./base/17149
4.4M ./base/17158
4.5M ./base/29156
4.4M ./base/29175
4.5M ./base/29184
55M ./base
160K ./global
32M ./pg_xlog
98K ./pg_clog
87M .
Does anybody know why this directory is 87MB while the database is
1MB?
--
Edwin Pauli

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #1
  • viewed: 1433
Share:
2 Replies
Hi.
A few days ago i've installed PostgreSQL 7.4.1
After the installation, Postgres was very fast.
But now, a few days later, it getting slower and slower.
1. Is the database designed well? For example: did you create indices
on fields used as search keys, ecc...

2. Do you vacuum you database once in a while? look for "vacuum
in the manual"...

I've looked in the data-dir and i was confused when i see the big
size from that directory.

A dump (created with pg_dump) is about 1MB.

pauli# cd /usr/local/pgsql/data
epauli# du -h
4.4M ./base/1
the template database is about 4MB
4.4M ./base/17141
19M ./base/17142
this is your database
i'll be more than 1 MB due to: not reclaimed free space (vacuum!), index
lookup tables, various overhead, ...
4.4M ./base/17143
4.4M ./base/17149
4.4M ./base/17158
4.5M ./base/29156
4.4M ./base/29175
4.5M ./base/29184
there are a few empty or almost empty databases;
see what they are with psql -l
55M ./base
160K ./global
32M ./pg_xlog
98K ./pg_clog
the transaction log files - always there after first use;
don't touch them, you'll need them!
Bye, Chris.

87M .
Does anybody know why this directory is 87MB while the database is
1MB?



---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 23 '05 #2
Edwin Pauli wrote:
Hi,

A few days ago i've installed PostgreSQL 7.4.1
After the installation, Postgres was very fast.
But now, a few days later, it getting slower and slower.

I've looked in the data-dir and i was confused when i see the big
size from that directory.
How often do you run VACUUM?

A dump (created with pg_dump) is about 1MB.

pauli# cd /usr/local/pgsql/data
epauli# du -h
4.4M ./base/1
4.4M ./base/17141
19M ./base/17142
4.4M ./base/17143
4.4M ./base/17149
4.4M ./base/17158
4.5M ./base/29156
4.4M ./base/29175
4.5M ./base/29184
55M ./base
160K ./global
32M ./pg_xlog
98K ./pg_clog
87M .
Does anybody know why this directory is 87MB while the database is
1MB?

--
Bill Moran
Potential Technologies
http://www.potentialtech.com
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by OneSolution | last post: by
8 posts views Thread by wlcna | last post: by
16 posts views Thread by Michal Hlavac | last post: by
4 posts views Thread by Paramveer.Singh@trilogy.com | last post: by
5 posts views Thread by Scott Frankel | last post: by
17 posts views Thread by Josh Close | last post: by
reply views Thread by Luiz Vianna | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.