Search Postgresql Archives

Re: Copying records from TABLE_A to TABLE_B (in the same database)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2022-08-02 13:08:41 -0600, Rob Sargent wrote:
>         If you can get outside sql, the bulk copy facilities (CopyManager in
>         java) is blindingly fast for me.
> 
> 
>     ??
> 
> 
> I meant using tools other than sql (and psql).   I have java code using
> org.postgresql.copy package

I don't know that package but I'm pretty sure it's just using the
PostgreSQL COPY command.

> because straight insert was too slow for large numbers of rows.

The OP already has the data in the database. In my experience[1] copying
from one table to another is quite a bit faster that copying into the
database (and therefore also copying out AND copying in).

        hp

[1] https://github.com/hjp/dbbench/blob/master/import_pg_comparison/results/akran.2019-12-15/results.png


-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@xxxxxx         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachment: signature.asc
Description: PGP signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux