Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 01BC39FB7DF for ; Thu, 31 May 2007 00:36:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 92271-09 for ; Thu, 31 May 2007 00:36:52 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.243]) by postgresql.org (Postfix) with ESMTP id 5CC869FB76A for ; Thu, 31 May 2007 00:36:50 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c36so12244ana for ; Wed, 30 May 2007 20:36:49 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:mime-version:content-type; b=VmCvJ+453VhsS7+Jnd0S2hdlaVTYC3S/nAyoGPX+IQ5eo6r8/sjevFlmTtDkGZlRhWE2faqi4G/DcTntPEJ287gNT4qagoHvSgMbi4qG9ooB205H7OIAvxsvbpAjQOBcnVKqWDB2eIZVPUs2ApBXGdAvWJ++CdxrhSKozTFLrAA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:mime-version:content-type; b=CcLGVpfpjiHAl52FBA5OMd19DGPw5rMVB+Fleb8XUwlBH0xIZqgnplq6Xbo9aAI6VsxmfHeJm4E+QLlMSOercmTV5rZJZJk8NLVIFtov75tFB437j6/snWl00LqKVuqyZKwf08tbRPg0Vh3xEewsCZmgj+t1rz33P/A64zakzpo= Received: by 10.100.57.14 with SMTP id f14mr75029ana.1180582608918; Wed, 30 May 2007 20:36:48 -0700 (PDT) Received: by 10.100.152.3 with HTTP; Wed, 30 May 2007 20:36:48 -0700 (PDT) Message-ID: <912b58490705302036n3c528b6fq4bfaa693a9e58dd7@mail.gmail.com> Date: Wed, 30 May 2007 23:36:48 -0400 From: "Hanu Kurubar" To: "Alvaro Herrera" Subject: Re: Append table Cc: "Michal Szymanski" , "Michal Szymanski" , "Tom Lane" , pgsql-performance@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_12030_12657593.1180582608870" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/634 X-Sequence-Number: 25024 ------=_Part_12030_12657593.1180582608870 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Can you help me appending two table values into single table without performing INSERT? Note that these tables are of same schema. Is there any sql command is supported? Thanks, Hanu On 5/29/07, Alvaro Herrera wrote: > > Michal Szymanski wrote: > > There is another strange thing. We have two versions of our test > > >>environment one with production DB copy and second genereated with > > >>minimal data set and it is odd that update presented above on copy of > > >>production is executing 170ms but on small DB it executing 6s !!!! > > > > > >How are you vacuuming the tables? > > > > > Using pgAdmin (DB is installed on my laptop) and I use this tool for > > vaccuminh, I do not think that vaccuming can help because I've tested on > > both database just after importing. > > I think you are misunderstanding the importance of vacuuming the table. > Try this: on a different terminal from the one running the test, run a > VACUUM on the updated table with vacuum_cost_delay set to 20, on an > infinite loop. Keep this running while you do your update test. Vary > the vacuum_cost_delay and measure the average/min/max UPDATE times. > Also try putting a short sleep on the infinite VACUUM loop and see how > its length affects the UPDATE times. > > One thing not clear to me is if your table is in a clean state. Before > running this test, do a TRUNCATE and import the data again. This will > get rid of any dead space that may be hurting your measurements. > > -- > Alvaro Herrera > http://www.advogato.org/person/alvherre > "The Postgresql hackers have what I call a "NASA space shot" mentality. > Quite refreshing in a world of "weekend drag racer" developers." > (Scott Marlowe) > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org > -- With best regards, Hanumanthappa Kurubar Mobile: 98 801 800 65 ------=_Part_12030_12657593.1180582608870 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Can you help me appending two table values into single table without performing INSERT?
Note that these tables are of same schema.
 
Is there any sql command is supported?
 
Thanks,
Hanu

 
On 5/29/07, Alvaro Herrera <alvherre@commandprompt.com> wrote:
Michal Szymanski wrote:
> There is another strange thing. We have two versions of our test
> >>environment one with production DB copy and second genereated with
> >>minimal data set and it is odd that update presented above on copy of
> >>production is executing 170ms but on small DB it executing 6s !!!!
> >
> >How are you vacuuming the tables?
> >
> Using pgAdmin (DB is installed on my laptop) and I use this tool for
> vaccuminh, I do not think that vaccuming can help because I've tested on
> both database just after importing.

I think you are misunderstanding the importance of vacuuming the table.
Try this: on a different terminal from the one running the test, run a
VACUUM on the updated table with vacuum_cost_delay set to 20, on an
infinite loop.  Keep this running while you do your update test.  Vary
the vacuum_cost_delay and measure the average/min/max UPDATE times.
Also try putting a short sleep on the infinite VACUUM loop and see how
its length affects the UPDATE times.

One thing not clear to me is if your table is in a clean state.  Before
running this test, do a TRUNCATE and import the data again.  This will
get rid of any dead space that may be hurting your measurements.

--
Alvaro Herrera                        http://www.advogato.org/person/alvherre
"The Postgresql hackers have what I call a "NASA space shot" mentality.
Quite refreshing in a world of "weekend drag racer" developers."
(Scott Marlowe)

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org



--
With best regards,
Hanumanthappa Kurubar
Mobile: 98 801 800 65 ------=_Part_12030_12657593.1180582608870--