Re: create table as select VS create table; insert as select

From: Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>
To: jacqui(dot)caren(at)ntlworld(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: create table as select VS create table; insert as select
Date: 2010-10-29 09:23:58
Message-ID: AANLkTi=+WtGyAns8N0n_ZdGgbuz6dD-S-CHH0P1bGTnG@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

On 29 October 2010 11:46, Jacqui Caren-home <jacqui(dot)caren(at)ntlworld(dot)com> wrote:
> I have inherited an application that populates a number of
> temp.y tables using create table ... as select ...

What is the principle of creating this temp.y tables?
May be table partitioning is better to implement here -
http://www.postgresql.org/docs/8.4/interactive/ddl-partitioning.html

>
> This is taking roughly five to ten minutes to run
>
> As this process hammers the database, I can only run benchmarks at night so
> am asking here if anyone know if
>
> create table ...; then insert into ... as select... ; would be faster.
>
> or if anyone can suggest an alternative I may have missed.
>
> I am happy to move code server side if need be.
>
> TIA
>
> Jacqui
>
> I know these is not a lot of detail in the above - the system is under NDA
> and I need to check with my employer before I give out any system details.
>
> Before you ask it is not a big customer - just a very paranoid one :-)
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

--
Sergey Konoplev

Blog: http://gray-hemp.blogspot.com /
Linkedin: http://ru.linkedin.com/in/grayhemp /
JID/GTalk: gray(dot)ru(at)gmail(dot)com / Skype: gray-hemp

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ivan Sergio Borgonovo 2010-10-29 10:32:41 Re: share lock when only one user connected?
Previous Message Jan C. 2010-10-29 09:10:16 pg_restore -t table doesn't restore PKEY