Re: cannot get CREATE TABLE AS to work - Mailing list pgsql-sql

From Josh Berkus
Subject Re: cannot get CREATE TABLE AS to work
Date
Msg-id 3AA90E65.CF04E297@agliodbs.com
Whole thread Raw
In response to cannot get CREATE TABLE AS to work  ("Creager, Robert S" <CreagRS@LOUISVILLE.STORTEK.COM>)
List pgsql-sql
Robert,

> Thanks for the pointers.  I'm actually working on modifying the structure of
> an existing db, so this is all within Pg.  Those INSERT INTOs with SELECTs
> are painfully slow, and I have an larger table to do this to...  I guess
> Perl will have to rescue me...

Why don't you post your SQL statements, table definitions, and estimate
results?  I'm sure one or more of the performance experts (Tom Stephan)
could find some improvements.  It doesn't makes sense that CREATE TABLE
AS should be faster than INSERT INTO ... SELECT.  It should be *slower*
unless you have 2 dozen indexes on the target table.
                -Josh Berkus

-- 
______AGLIO DATABASE SOLUTIONS___________________________                                       Josh Berkus  Complete
informationtechnology      josh@agliodbs.com   and data management solutions       (415) 565-7293  for law firms, small
businesses      fax  621-2533   and non-profit organizations.       San Francisco
 


pgsql-sql by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: cannot get CREATE TABLE AS to work
Next
From: Tom Lane
Date:
Subject: Re: cannot get CREATE TABLE AS to work