473,289 Members | 2,089 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

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
2 1574
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: OneSolution | last post by:
I need to decide on which database system to use for our company. What is the popular opinion on PostGres vs. MySql? Thanks, Santosh
8
by: wlcna | last post by:
mysql v4.0.16: I had been using mysql with innodb and thought that was fine, until i used it for something requiring a few - perhaps slightly involved - joins, and have now seen the performance...
16
by: Michal Hlavac | last post by:
Hello, I am working on web portal. There are some ads. We have about 200 000 ads. Every ad have own directory called ID, where is 5 subdirectories with various sizes of 5 images. Filesystem...
18
by: Joe Lester | last post by:
This thread was renamed. It used to be: "shared_buffers Question". The old thread kind of died out. I'm hoping to get some more direction by rephrasing the problem, along with some extra...
4
by: Paramveer.Singh | last post by:
Hi all! I am running postgres 8 beta1 and for some reason it is really slow in execution. I am not able to figure out why. On a fresh install of postgres, the following code executed through jdbc...
5
by: Scott Frankel | last post by:
I'm looking for the file postgres.h in my recent install of postgres-7.4.5 on a MacOS 10.3.5 system. I'm attempting to build PyGreSQL-3.5, which appears to require the postgres include dir. ...
17
by: Josh Close | last post by:
I know this is kinda a debate, but how much ram do I give postgres? I've seen many places say around 10-15% or some say 25%....... If all this server is doing is running postgres, why can't I give...
0
by: Luiz Vianna | last post by:
Hi folks, I´m working on this for a couple of days... I configured membership for my application. I can create user, login, logout, the user screen is save and comes back when him logs back....
1
by: micofarmer | last post by:
We are running a PHP web-based frontend with a Postgres 7.2 backend on a Windows 2000 Server box with automated backups of the server being handled by Legato. We are experiencing several problems...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.