[BioC] RdbiPgSQL: slowness in dbWriteTable

Sean Davis sdavis2 at mail.nih.gov
Wed Sep 5 18:34:53 CEST 2007


John Zhang wrote:
>> Yup, your method is essentially what I came across yesterday afternoon,
>> with some slight variations.  What you outline is a bit better
>> though.  This works for my immediate task, although I'm going to need a
>> way to allow this to be automated (hopefully within RdbiPgSQL
>> itself).  COPY won't work, and /copy of course needs to be called from
>> psql.  One thought was to try and get /copy implemented in R.
>>
> 
> 
> Hi, jeff,
> 
> Have you tried to do copy in plain sql within RdbiPgSQL? e. g. 
> 
>> sql <- "copy yourDBName from 'yourFileName' using delimiters 'yourDelimiters'"
>> dbSendQuery(yourConnection, sql)  

I don't think this will work unless the file is already on the
postgresql server.  From the postgres manual:

"COPY with a file name instructs the PostgreSQL server to directly read
from or write to a file. The file must be accessible to the server and
the name must be specified from the viewpoint of the server."

If Jeff is on the DB machine, then I think this will work.

Sean



More information about the Bioconductor mailing list