pgsql: Speed up printing of INSERT statements in pg_dump.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Speed up printing of INSERT statements in pg_dump.
Date: 2013-11-15 23:02:12
Message-ID: E1VhSOy-0005LW-DB@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Speed up printing of INSERT statements in pg_dump.

In --inserts and especially --column-inserts mode, we can get a useful
speedup by generating the common prefix of all a table's INSERT commands
just once, and then printing the prebuilt string for each row. This avoids
multiple invocations of fmtId() and other minor fooling around.

David Rowley

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/97e1ec467099f1e581f491c8a57b7d56d0b9c539

Modified Files
--------------
src/bin/pg_dump/pg_dump.c | 73 +++++++++++++++++++++++++++++++--------------
1 file changed, 50 insertions(+), 23 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2013-11-15 23:35:15 pgsql: Fix incorrect loop counts in tidbitmap.c.
Previous Message Tom Lane 2013-11-15 22:27:51 pgsql: Clean up password prompting logic in streamutil.c.