Postgres vacuuming

Rich Lafferty rich@horde.org
Wed, 20 Dec 2000 16:39:36 -0500


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. :-)

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. :-)

  -Rich

-- 
------------------------------ Rich Lafferty ---------------------------
 Sysadmin/Programmer, Instructional and Information Technology Services
   Concordia University, Montreal, QC                 (514) 848-7625
------------------------- rich@alcor.concordia.ca ----------------------