Skip site navigation (1) Skip section navigation (2)

RE: [HACKERS] Re: [PORTS] vacuum takes too long

From: "Jackson, DeJuan" <djackson(at)cpsgroup(dot)com>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: scrappy(at)hub(dot)org, dave(at)turbocat(dot)de, ports(at)postgreSQL(dot)org, hackers(at)postgreSQL(dot)org
Subject: RE: [HACKERS] Re: [PORTS] vacuum takes too long
Date: 1999-01-07 18:17:09
Message-ID: F10BB1FAF801D111829B0060971D839F5BFB07@cpsmail (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-ports
> > With MVCC an occasional 'vacuum analyze' should only be 
> noticed from the
> > performance improvements.  As far as I can tell most of the 
> work done by
> > an analyze is in reading the table data.  If you make sure 
> to write the
> > new information at the end of the transaction you only lock 
> the indexes
> > for the amount of time it takes to write them.
> > 
> > I see a 'vacuum analyze' being less of a problem than 'vacuum'.
> > Any of you experts can contradict my assumptions.
> The problem is that vacuum analyze does both vacuum and analyze. 
> Analyze takes so long, we figured we might as well vacuum 
> too.  Maybe we
> need to change that.
It seems that VACUUM would have to lock most of the rows in a table even
with MVCC; where as ANALYZE can benefit directly from MVCC never
blocking a reader.  I for one agree in the separation (hey I always
thought they were separate).
How hard would it be to have VACUUM cheat on the table write?  Have
VACUUM take advantage of the fact that we are actually using a file
system file as much as is possible in it's VACUUM.  Therefore the actual
moving of the rows could be accomplished in the time it takes to select
all the rows into a new table file and then change the file.  There
might be some issues with file-node trouble in the system catalogs, but
those could be taken care of quickly as well.  The only things that
you'd have to watch for is a write to the table in the middle of your
reading of the rows.  CLUSTER could also use the same system with a
order by on an index.  Let me know what you think.
You know what else...  MVCC would allow us to ignore updating indexes on
a COPY if combined with the new quicker ANALYZE after the COPY.
	Keeping the ideas coming,

pgsql-ports by date

Next:From: Selva NairDate: 1999-01-07 20:31:02
Subject: Installed on Linux 2.0.34 /Slackware
Previous:From: Bruce MomjianDate: 1999-01-07 17:49:57
Subject: Re: [HACKERS] Re: [PORTS] vacuum takes too long

pgsql-hackers by date

Next:From: Thomas G. LockhartDate: 1999-01-07 18:26:56
Subject: Outer Joins (and need CASE help)
Previous:From: Bruce MomjianDate: 1999-01-07 17:54:11
Subject: Re: [DOCS] Upcoming Attractions, web site

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group