Re: Append table

From: "Hanu Kurubar" <hanu(dot)kurubar(at)gmail(dot)com>
To: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>
Cc: "Michal Szymanski" <szymanskim(at)gdfi(dot)pl>, "Michal Szymanski" <szymanskim(at)datera(dot)pl>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Append table
Date: 2007-05-31 03:36:48
Message-ID: 912b58490705302036n3c528b6fq4bfaa693a9e58dd7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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(at)commandprompt(dot)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

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Albert Cervera Areny 2007-05-31 11:00:49 Re: Bad RAID1 read performance
Previous Message Rajesh Kumar Mallah 2007-05-31 01:54:40 Re: setting up raid10 with more than 4 drives