X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 2399A4758F1 for ; Mon, 12 May 2003 19:03:02 -0400 (EDT) Received: from hacklab.net (h-68-164-245-144.SNVACAID.covad.net [68.164.245.144]) by postgresql.org (Postfix) with SMTP id 65FDD47580B for ; Mon, 12 May 2003 19:02:54 -0400 (EDT) Received: (qmail 24161 invoked by uid 421); 12 May 2003 22:57:17 -0000 Received: from pvspam-postgres@hacklab.net by penguin.hacklab.net by uid 417 with qmail-scanner-1.16 ( Clear:SA:0(-26.8/5.0):. Processed in 0.26667 secs); 12 May 2003 22:57:17 -0000 Received: from localhost (antispam@127.0.0.1) by localhost with SMTP; 12 May 2003 22:57:17 -0000 Subject: Re: No flamefest please, MySQL vs. PostgreSQL AGAIN From: timeless postgres To: Tom Lane Cc: pgsql-admin@postgresql.org In-Reply-To: <8851.1052749960@sss.pgh.pa.us> References: <1052721342.17601.118.camel@timetop> <8851.1052749960@sss.pgh.pa.us> Content-Type: text/plain Organization: PostgreSQL Admin Message-Id: <1052780562.25329.36.camel@timetop> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2-1mdk Date: 12 May 2003 16:02:42 -0700 Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-32.9 required=5.0 tests=BAYES_01,IN_REP_TO,QUOTED_EMAIL_TEXT,QUOTE_TWICE_1, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_XIMIAN autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/145 X-Sequence-Number: 8707 > > 3. Non-logged bulk inserts -- How much logging does COPY table FROM > > do? Is it comparable to a MySQL MyISAM table? > I cannot imagine why you'd want non-logged inserts, unless you don't > actually care about your data. More or less, we don't. If we try to insert 1,000 entries, and our table has now 1,000 entries more, then we're satisfied. If our database goes down, we simply need to re-load. It's a data warehouse, after all, and its source is the L bit of the ETL (extract/transform/load) process. All the data we truly care about transactions for are on the OLTP databases. To wit: atomicity? We don't care. Consistency? We don't care. Isolation? We don't care. Durability? We care, but if it goes dead-mode before buffers get flushed to disk, we've got all the data ready to load again. Maybe I don't understand how to ask the question. I want to know how to insert (say) 10M rows into a table quickly. I mean... VERY quickly. Obviously the following 10M transactions are going to be slow: insert into tab values (1); insert into tab values (2); insert into tab values (3); . . . insert into tab values (10000000); Would it be faster if I put a single transaction around that? Would it be faster to do the following? copy tab (col) from stdin; 1 2 3 . . . 10000000 \. > It should be noted though that as of > 7.3, operations on TEMP tables don't do WAL logging; perhaps that > would be of use to you. It does sound useful, on new tables, to load into a temp table, then rename the temp table as permanent table. > [point-in-time recovery] might be there in 7.4 ... it ain't there today Would it be better to hang out on hackers to find out about this? Looking at archives, I see messages all the way back to July of last year talking about it. I only recall seeing one message (from Bruce) about it on this list. -- Tim Ellis Senior Database Architect and author, tedia2sql (http://tedia2sql.tigris.org) If this helped you, http://svcs.affero.net/rm.php?r=philovivero