niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Databases » PostgreSQL
VACUUM and index
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
Author Message
Martijn van Oosterhout
*nix forums Guru


Joined: 02 Mar 2005
Posts: 674

PostPosted: Wed Jul 19, 2006 1:28 pm    Post subject: Re: VACUUM and index Reply with quote

On Wed, Jul 19, 2006 at 03:23:08PM +0200, DANTE Alexandra wrote:
Quote:
Thank you Martijn for your answer !
I use the 8.1.3 release of PostgreSQL.

You'll be fine...

Quote:
Will it be sensible to launch an ANALYZE after the VACUUM to update
statistics ?

Or do both at the same time (VACUUM ANALYZE).

Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
Back to top
DANTE Alexandra
*nix forums beginner


Joined: 07 Jul 2006
Posts: 9

PostPosted: Wed Jul 19, 2006 1:23 pm    Post subject: Re: VACUUM and index Reply with quote

Thank you Martijn for your answer !
I use the 8.1.3 release of PostgreSQL.

Will it be sensible to launch an ANALYZE after the VACUUM to update
statistics ?

Regards,
Alexandra

Martijn van Oosterhout wrote:

Quote:
On Wed, Jul 19, 2006 at 03:03:43PM +0200, DANTE Alexandra wrote:


Imagine you have a database on which a lot of transactions are done
daily : the tables will contain a lot of dead tuples and the B-tree
index too.

If I do a VACUUM on this database, will the B-tree index be scanned,
space reclaimed and made available for re-use ?



Old versions didn't, but recent versions do.



Does this action only do by a VACUUM FULL ?



Also by VACUUM FULL, but plain VACIIM is enough.



Or is it necessary to do a REINDEX on the index to retrieve a
well-balanced tree ?



There are always corner case situations. In older versions a REINDEX
helped balance the tree but recent versions are much better.

Have a nice day,




---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq
Back to top
Martijn van Oosterhout
*nix forums Guru


Joined: 02 Mar 2005
Posts: 674

PostPosted: Wed Jul 19, 2006 1:13 pm    Post subject: Re: VACUUM and index Reply with quote

On Wed, Jul 19, 2006 at 03:03:43PM +0200, DANTE Alexandra wrote:
Quote:
Imagine you have a database on which a lot of transactions are done
daily : the tables will contain a lot of dead tuples and the B-tree
index too.

If I do a VACUUM on this database, will the B-tree index be scanned,
space reclaimed and made available for re-use ?

Old versions didn't, but recent versions do.

Quote:
Does this action only do by a VACUUM FULL ?

Also by VACUUM FULL, but plain VACIIM is enough.

Quote:
Or is it necessary to do a REINDEX on the index to retrieve a
well-balanced tree ?

There are always corner case situations. In older versions a REINDEX
helped balance the tree but recent versions are much better.

Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
Back to top
DANTE Alexandra
*nix forums beginner


Joined: 07 Jul 2006
Posts: 9

PostPosted: Wed Jul 19, 2006 1:03 pm    Post subject: VACUUM and index Reply with quote

Hello List,

Sorry to send an other e-mail on this subject but it is become a little
bit vague for me.
Imagine you have a database on which a lot of transactions are done
daily : the tables will contain a lot of dead tuples and the B-tree
index too.

If I do a VACUUM on this database, will the B-tree index be scanned,
space reclaimed and made available for re-use ?
Does this action only do by a VACUUM FULL ?
Or is it necessary to do a REINDEX on the index to retrieve a
well-balanced tree ?

Thank you for your help.

Regards,
Alexandra DANTE

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
The time now is Thu Dec 04, 2008 2:51 am | All times are GMT
navigation Forum index » Databases » PostgreSQL
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts container for insert/delete + fast index Neal Becker C++ 1 Fri Jul 21, 2006 12:57 pm
No new posts (secondary) index-only scans Ryan Berkeley DB 1 Thu Jul 20, 2006 8:32 pm
No new posts Create index hanging Claire McLister PostgreSQL 7 Thu Jul 20, 2006 8:11 pm
No new posts number of distinct values in tsearch2 gist index Kevin Murphy PostgreSQL 0 Tue Jul 18, 2006 5:24 pm
No new posts undefined index Chris PHP 4 Tue Jul 18, 2006 3:45 pm

Debt Help | Myspace Codes | Personal Loans | Watch Anime Online | Myspace Layouts
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 27.0302s ][ Queries: 20 (26.8966s) ][ GZIP on - Debug on ]