Skip to content

Commit

Permalink
Fix not-entirely-accurate comment about COPY FROM being "much faster"
Browse files Browse the repository at this point in the history
lpsmith#3 (comment)

Performing INSERTs within a transaction block is much faster than without, but
is still slower than COPY.  Also, multiple rows can be inserted with a single
INSERT statement:

    INSERT INTO tablename (id, col1, col2) VALUES
        (1, 0, 1),
        (2, 1, 0),
        (3, 1, 1);
  • Loading branch information
joeyadams committed Mar 10, 2012
1 parent 5ab97d9 commit f518bde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Database/PostgreSQL/LibPQ.hsc
Expand Up @@ -1519,8 +1519,8 @@ unescapeBytea bs =
-- $copyfrom -- $copyfrom
-- --
-- This provides support for PostgreSQL's @COPY FROM@ facility. When inserting -- This provides support for PostgreSQL's @COPY FROM@ facility. When inserting
-- rows in bulk, @COPY FROM@ is /much/ faster than individual @INSERT@ -- rows in bulk, @COPY FROM@ is faster than individual @INSERT@ statements for
-- statements. -- each row.
-- --
-- For more information, see: -- For more information, see:
-- --
Expand Down

0 comments on commit f518bde

Please sign in to comment.