Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f29HAUx87604 for ; Fri, 9 Mar 2001 12:10:30 -0500 (EST) (envelope-from josh@agliodbs.com) Received: from [209.122.114.86] (HELO agliodbs.com) by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.4.1) with ESMTP id 22779; Fri, 09 Mar 2001 09:10:29 -0800 Message-ID: <3AA90E65.CF04E297@agliodbs.com> Date: Fri, 09 Mar 2001 09:09:57 -0800 From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions X-Mailer: Mozilla 4.73 [en] (Win98; I) X-Accept-Language: en MIME-Version: 1.0 To: "Creager, Robert S" , sqllist Subject: Re: cannot get CREATE TABLE AS to work References: <10FE17AD5F7ED31188CE002048406DE8514CE2@lsv-msg06.stortek.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200103/198 X-Sequence-Number: 1852 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 information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco