Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 5D471161CA36 for ; Mon, 20 Feb 2012 15:30:06 -0400 (AST) Received: from gwmta.wicourts.gov ([165.219.244.99] helo=gw.wicourts.gov) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RzYw1-00018q-E0 for pgsql-performance@postgresql.org; Mon, 20 Feb 2012 19:30:06 +0000 Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Mon, 20 Feb 2012 13:29:52 -0600 Message-Id: <4F424AC70200002500045902@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.2 Date: Mon, 20 Feb 2012 13:29:43 -0600 From: "Kevin Grittner" To: "Ofer Israeli" , "pgsql-performance@postgresql.org" Cc: "Netta Kabala" , "Olga Vingurt" Subject: Re: Insertions slower than Updates? References: <217DDBC2BB1E394CA9E7446337CBDEF20102C05A6A37@il-ex01.ad.checkpoint.com> <4F4246E702000025000458F7@gw.wicourts.gov> <217DDBC2BB1E394CA9E7446337CBDEF20102C05A6A3C@il-ex01.ad.checkpoint.com> In-Reply-To: <217DDBC2BB1E394CA9E7446337CBDEF20102C05A6A3C@il-ex01.ad.checkpoint.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201202/142 X-Sequence-Number: 46314 Ofer Israeli wrote: > Kevin Grittner wrote: >> Ofer Israeli wrote: >>> Anyone have any ideas on why the empty db is giving worse >>> results?? >> >> Besides the HOT updates being fast, there is the issue of having >> space already allocated and ready for the database to use, rather >> than needing to make calls to the OS to create and extend files >> as space is needed. > > I thought about this direction as well, but on UPDATES, some of > them will need to ask the OS for more space anyhow at least at the > beginning of the run, additional pages will be needed. Do you > expect that the OS level allocations are so expensive as to show > an ~%40 increase of processing time in average? Gut feel, 40% does seem high for just that; but HOT updates could easily account for that, especially since you said that the tables are "heavily indexed". That is, as long as there are enough updates which don't modify indexed columns. -Kevin