Permalink
Browse files

Fix not-entirely-accurate comment about COPY FROM being "much faster"

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...
1 parent 5ab97d9 commit f518bde108f89fdede339830bbad8151d60e6897 @joeyadams committed Mar 10, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 Database/PostgreSQL/LibPQ.hsc
View
4 Database/PostgreSQL/LibPQ.hsc
@@ -1519,8 +1519,8 @@ unescapeBytea bs =
-- $copyfrom
--
-- This provides support for PostgreSQL's @COPY FROM@ facility. When inserting
--- rows in bulk, @COPY FROM@ is /much/ faster than individual @INSERT@
--- statements.
+-- rows in bulk, @COPY FROM@ is faster than individual @INSERT@ statements for
+-- each row.
--
-- For more information, see:
--

0 comments on commit f518bde

Please sign in to comment.