pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hanu Kurubar <hanu.kurubar@gmail.com>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Michal Szymanski <szymanskim@gdfi.pl>
Cc: Michal Szymanski <szymanskim@datera.pl>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: Append table
Date: Sat, 2 Jun 2007 11:52:08 -0400
Message-ID: <912b58490706020852r61d308b3m595bf410d89a113@mail.gmail.com> (raw)
In-Reply-To: <912b58490705302036n3c528b6fq4bfaa693a9e58dd7@mail.gmail.com>
References: <912b58490705302036n3c528b6fq4bfaa693a9e58dd7@mail.gmail.com>

Any luck on appending two table in PostgreSQL.
Below are two table with same schema that have different values. In this
case EmpID is unique value.

tabelA
------------
EmpId (Int) EmpName (String)
1               Hanu
2               Alvaro


tabelB
------------
EmpId (Int) EmpName (String)
3               Michal
4               Tom


I would be looking below output after appending tableA with tableB. Is this
possible in PostgreSQL?


tabelA
------------
EmpId (Int) EmpName (String)
1               Hanu
2               Alvaro
3               Michal
4               Tom


Thanks,
Hanu


On 5/30/07, Hanu Kurubar <hanu.kurubar@gmail.com> wrote:
>
> 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




-- 
With best regards,
Hanumanthappa Kurubar
Mobile: 98 801 800 65

view thread (6+ messages)  latest in thread

Message-ID: <912b58490706020852r61d308b3m595bf410d89a113@mail.gmail.com>
Permalink:  ../912b58490706020852r61d308b3m595bf410d89a113@mail.gmail.com/
Also on:    postgresql.org/message-id/912b58490706020852r61d308b3m595bf410d89a113@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: hanu.kurubar@gmail.com, alvherre@commandprompt.com, szymanskim@gdfi.pl, szymanskim@datera.pl, tgl@sss.pgh.pa.us
  Subject: Re: Append table
  In-Reply-To: <912b58490706020852r61d308b3m595bf410d89a113@mail.gmail.com>
  References: <912b58490705302036n3c528b6fq4bfaa693a9e58dd7@mail.gmail.com> <912b58490706020852r61d308b3m595bf410d89a113@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox