From: timeless postgres <pvspam-postgres@hacklab.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-admin@postgresql.org
Subject: Re: No flamefest please, MySQL vs. PostgreSQL AGAIN
Date: 12 May 2003 16:02:42 -0700
Message-ID: <1052780562.25329.36.camel@timetop> (raw)
In-Reply-To: <8851.1052749960@sss.pgh.pa.us>
References: <1052721342.17601.118.camel@timetop>
<8851.1052749960@sss.pgh.pa.us>
> > 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: pvspam-postgres@hacklab.net, tgl@sss.pgh.pa.us
Subject: Re: No flamefest please, MySQL vs. PostgreSQL AGAIN
In-Reply-To: <1052780562.25329.36.camel@timetop>
References: <1052721342.17601.118.camel@timetop> <8851.1052749960@sss.pgh.pa.us> <1052780562.25329.36.camel@timetop>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox