Hi, Here's a little writeup I did awhile ago on this:
http://www.misuse.org/science/2007/02/16/importing-to-postgresql-from-activerecord-amp-rails/ Let me know if you have trouble getting it going. This method of import is at least 1000 times faster than using standard activerecord inserts.. Steve At 10:23 AM 12/20/2007, Anthony Eden wrote: >Sure, go ahead and post it and I'll see if I can get it in there. >Perhaps it can be used as a failover if the local file system is >inaccessible. > >V/r >Anthony Eden > >On 12/19/07, Steve Midgley <[EMAIL PROTECTED]> wrote: > > Hi warehouse friends, > > > > I took a look at the adapter_extensions code for Postgres today - > it's > > a great idea. I think the code you've got only works for loading > files > > onto a file system accessible by the Postgres server? In a shared > > hosting environment this may surprisingly limited. I think most > people > > would expect to be able to load files from anywhere visible to the > > client? > > > > I have some Postgres sql code that permits bulk loading data via > COPY, > > but using STDIN as the source, so you can feed it via a file on the > > client side, rather than from a server-accessible file. Of course > it's > > not as fast as reading a file from a local SCSI array, but sending > data > > to copy COPY over a network wire is way faster than any other > remote > > technique I've found. > > > > I'm happy to post this code to the list or to the code maintainer > if > > it's of interest. Just let me know! > > > > Sincerely, > > > > Steve > > > > _______________________________________________ > > Activewarehouse-discuss mailing list > > Activewarehouse-discuss@rubyforge.org > > http://rubyforge.org/mailman/listinfo/activewarehouse-discuss > > _______________________________________________ Activewarehouse-discuss mailing list Activewarehouse-discuss@rubyforge.org http://rubyforge.org/mailman/listinfo/activewarehouse-discuss