Re: bytea vs. pg_dump

From: Bernd Helmle <mailings(at)oopsware(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: bytea vs. pg_dump
Date: 2009-05-12 11:52:39
Message-ID: 299012482D9F2E375E631D5F@teje
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

--On Mittwoch, Mai 06, 2009 19:04:21 -0400 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
wrote:

> So I'm now persuaded that a better textual representation for bytea
> should indeed make things noticeably better here. It would be
> useful though to cross-check this thought by profiling a case that
> dumps a comparable volume of text data that contains no backslashes...

This is a profiling result of the same data converted into a printable text
format without any backslashes. The data amount is quite the same and as
you already guessed, calls to appendBinaryStringInfo() and friends gives
the expected numbers:

time seconds seconds calls s/call s/call name
35.13 24.67 24.67 134488 0.00 0.00 byteaout
32.61 47.57 22.90 134488 0.00 0.00 CopyOneRowTo
28.92 67.88 20.31 85967 0.00 0.00 pglz_decompress
0.67 68.35 0.47 4955300 0.00 0.00
hash_search_with_hash_value
0.28 68.55 0.20 11643046 0.00 0.00 LWLockRelease
0.28 68.75 0.20 4828896 0.00 0.00 index_getnext
0.24 68.92 0.17 1208577 0.00 0.00 StrategyGetBuffer
0.23 69.08 0.16 11643046 0.00 0.00 LWLockAcquire
...
0.00 70.23 0.00 134498 0.00 0.00 enlargeStringInfo
0.00 70.23 0.00 134497 0.00 0.00 appendBinaryStringInfo
0.00 70.23 0.00 134490 0.00 0.00 AllocSetReset
0.00 70.23 0.00 134490 0.00 0.00 resetStringInfo
0.00 70.23 0.00 134488 0.00 0.00 CopySendChar
0.00 70.23 0.00 134488 0.00 0.00 CopySendEndOfRow

--
Thanks

Bernd

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-05-12 13:19:30 Re: DROP TABLE vs inheritance
Previous Message Heikki Linnakangas 2009-05-12 11:38:11 Re: New trigger option of pg_standby