Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 8B1602E004A for ; Thu, 15 May 2008 19:30:51 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 80251-10 for ; Thu, 15 May 2008 19:30:44 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from oxford.xeocode.com (87-127-95-198.no-dns-yet.enta.net [87.127.95.198]) by developer.postgresql.org (Postfix) with ESMTP id 31A5B2E0057 for ; Thu, 15 May 2008 19:30:48 -0300 (ADT) Received: from localhost ([127.0.0.1] helo=oxford.xeocode.com) by oxford.xeocode.com with esmtp (Exim 4.69) (envelope-from ) id 1JwlyD-0001RA-JF; Thu, 15 May 2008 23:30:41 +0100 To: "Luke Lonergan" Cc: "Pavan Deolasee" , "Greg Smith" , "Alvaro Herrera" , Subject: Re: I/O on select count(*) In-Reply-To: (Luke Lonergan's message of "Thu\, 15 May 2008 10\:52\:01 +0800") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Draft-From: ("nnimap+mail01.enterprisedb.com:INBOX.performance" 5650) References: From: Gregory Stark Organization: EnterpriseDB Date: Thu, 15 May 2008 23:30:41 +0100 Message-ID: <87hcczqjxq.fsf@oxford.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/231 X-Sequence-Number: 30199 "Luke Lonergan" writes: > BTW =AD we=B9ve removed HINT bit checking in Greenplum DB and improved the > visibility caching which was enough to provide performance at the same le= vel > as with the HINT bit optimization, but avoids this whole =B3write the dat= a, > write it to the log also, then write it again just for good measure=B2 > 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 sa= me transaction.=20 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 pa= ges until the transaction commits. This is similar to the abortive attempt to have the abovementioned WAL logg= ing 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. --=20 Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's Slony Replication support!