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

Re: I/O on select count(*)

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Luke Lonergan" <llonergan(at)greenplum(dot)com>
Cc: "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com>, "Greg Smith" <gsmith(at)gregsmith(dot)com>, "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: I/O on select count(*)
Date: 2008-05-15 22:30:41
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
"Luke Lonergan" <llonergan(at)greenplum(dot)com> writes:

> BTW ­ we¹ve removed HINT bit checking in Greenplum DB and improved the
> visibility caching which was enough to provide performance at the same level
> as with the HINT bit optimization, but avoids this whole ³write the data,
> write it to the log also, then write it again just for good measure²
> behavior.
> For people doing data warehousing work like the poster, this Postgres
> behavior is miserable.  It should be fixed for 8.4 for sure (volunteers?)

For people doing data warehousing I would think the trick would be to do
something like what we do to avoid WAL logging for tables created in the same

That is, if you're loading a lot of data at the same time then all of that
data is going to be aborted or committed and that will happen at the same
time. Ideally we would find a way to insert the data with the hint bits
already set to committed and mark the section of the table as being only
provisionally extended so other transactions wouldn't even look at those pages
until the transaction commits.

This is similar to the abortive attempt to have the abovementioned WAL logging
trick insert the records pre-frozen. I recall there were problems with that
idea though but I don't recall if they were insurmountable or just required
more work.

  Gregory Stark
  Ask me about EnterpriseDB's Slony Replication support!

In response to

pgsql-performance by date

Next:From: Kevin GrittnerDate: 2008-05-15 22:38:27
Subject: Re: I/O on select count(*)
Previous:From: James MansionDate: 2008-05-15 22:11:52
Subject: Re: I/O on select count(*)

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