-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Duncan Murdoch
Sent: Friday, May 19, 2006 11:17 AM
To: r-help at stat.math.ethz.ch
Subject: [R] Fast update of a lot of records in a database?
We have a PostgreSQL table with about 400000 records in it. Using
either RODBC or RdbiPgSQL, what is the fastest way to update
one (or a
few) column(s) in a large collection of records? Currently we're
sending sql like
BEGIN
UPDATE table SET col1=value WHERE id=id
(repeated thousands of times for different ids)
COMMIT
and this takes hours to complete. Surely there must be a quicker way?
Duncan Murdoch