[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    RE: [postgis-users] index update
From:       chodgson () refractions ! net
Date:       2003-06-20 16:01:45
Message-ID: 1056124905.3ef32fe90febf () www
[Download RAW message or body]

> I don't think you need to drop and rebuild the index.  The new entries will
> be indexed.

This is correct.
 
> It's a good idea to vacuum analyze the database every so often anyway to
> purge old junk and rebuild statistics.

The more often you make changes, the more often you should vacuum.

> If you are loading a lot of data though - you may want to drop the index,
> load the data and then readd the index.  I think that runs a lot faster (but
> I could be wrong).

It depends on the ratio between how much data is already in the table and how 
much you are adding. If you have an empty table, and you are loading any amount 
of data, it is worth waiting until afterward to create/build the index. If you 
are only adding < 50% of the existing size of the table, you are probably 
better off leaving the index in place. Alos, if you are talking about a table 
that has live queries being made from it, you won't want to drop the index 
because those queries will slow down without the index and while the index is 
being built.





[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic