In response to "Magnus Hagander" <[EMAIL PROTECTED]>:

> > > > Also, ensure that you vacuum and analyze PostgreSQL databases 
> > > > frequently.
> > > > An occasional REINDEX helps as well.  These are normal 
> > maintenance 
> > > > tasks for PostgreSQL.  ANALYZE is especially important 
> > right after 
> > > > populating a new database.
> > > 
> > > REINDEX really shouldn't be needed anymore as long as your 
> > database is 
> > > properly configured, but if you're still on 7.x it may be.
> > 
> > Fact is, in actual experience, doing a REINDEX resulted in 
> > both a noticeable reduction in the size of the database, and 
> > the appearance of a performance gain.  The performance part 
> > is arguable, since I didn't do any benchmarking, but it 
> > _seemed_ faster ;)
> 
> If it did make a difference, you probably want to check the values for
> your freespace map size. If there's not enough space in the freespace
> map, vacuum won't be able to properly deal with the indexes so this can
> happen.

Well ... feel free to correct me if I'm wrong, but vacuum isn't capable
of completely optimizing indexes.  It only deletes empty index pages.
The result is that over time, you accumulate lots of half-empty index
pages.

REINDEX recompacts the indexes into full pages.  This results in less
IO required to read the index off disk.

Theoretically, you shouldn't have to REINDEX because the free space will
be reused in time, but it can get pretty fragmented under normal usage.
Depending on the page size, this may or may not have a noticeable impact
on performance.  It definitely has a noticeable impact on disk usage.

-- 
Bill Moran
Collaborative Fusion Inc.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to