| From: | "Craig A(dot) James" <cjames(at)modgraph-usa(dot)com> |
|---|---|
| To: | "Jim C(dot) Nasby" <jim(at)nasby(dot)net> |
| Cc: | Worky Workerson <worky(dot)workerson(at)gmail(dot)com>, Merlin Moncure <mmoncure(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org |
| Subject: | Re: Best COPY Performance |
| Date: | 2006-10-25 16:52:14 |
| Message-ID: | 453F963E.4010206@modgraph-usa.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
Jim C. Nasby wrote:
> Wait... so you're using perl to copy data between two tables? And using
> a cursor to boot? I can't think of any way that could be more
> inefficient...
>
> What's wrong with a plain old INSERT INTO ... SELECT? Or if you really
> need to break it into multiple transaction blocks, at least don't
> shuffle the data from the database into perl and then back into the
> database; do an INSERT INTO ... SELECT with that same where clause.
The data are on two different computers, and I do processing of the data as it passes through the application. Otherwise, the INSERT INTO ... SELECT is my first choice.
Craig
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Spiegelberg, Greg | 2006-10-25 17:15:40 | Re: Best COPY Performance |
| Previous Message | Luke Lonergan | 2006-10-25 16:34:01 | Re: Best COPY Performance |