[imp] Postgres vacuuming

Martin A. Marques martin@math.unl.edu.ar
Wed, 20 Dec 2000 18:52:51 -0300


El Mié 20 Dic 2000 18:39, escribiste:
> Holy cow.
>
> Noticed our IMP install running slowly. Figured it might be because
> there were an inordinate number of sessions hanging around. Okay,
> "SELECT count(*) FROM active_sessions" says only 700, but took a
> little over a minute to run.
>
> That won't do.
>
> Realized that we hadn't run VACUUM or VACUUM ANALYZE, *ever*.
>
> Ran VACUUM, which took ten minutes (!).
>
> Now, "SELECT count(*) FROM active_sessions" takes under a second, and
> IMP isn't running slowly.
>
> Which leads me to believe that some mention of VACUUM should
> *probably* appear in the doco. But I'm not sure *where*. The fact that
> no-one's mentioned this before makes me wonder how many people are
> just putting up with it. Or, maybe *they* all remembered to vacuum. :-)

AFAIK, it's in the postgres docs. The reason why we have to VACUUM (us the 
postgresql users ;-) ) is that after deletes and updates, there are rows that 
stay in the database as garbage, which makes the database slow (sometimes 
really slow), but a Vacuum eliminates those rows.

> In other news: replacing IMP 2.2's second pg_pconnect with pg_connect
> appears to cause no problems; I'll patch when I replace "appears to
> cause" with "causes" sometime tomorrow. :-)

I am very confused with this persistent connection problem that PHP has. 
Maybe I take a look at the code to see where the problem can be, but I don't 
know why those persistent connections aren't reused. Could it be an apache 
problem?

Saludos... ;-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-----------------------------------------------------------------
Martín Marqués			email: 	martin@math.unl.edu.ar
Santa Fe - Argentina		http://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-----------------------------------------------------------------