Skip site navigation (1) Skip section navigation (2)

Re: Inefficient bytea escaping?

From: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Inefficient bytea escaping?
Date: 2006-05-27 11:52:52
Message-ID: (view raw or whole thread)
Lists: pgsql-hackers
Tom Lane wrote:
> I wrote:
>>I'm off for a little visit with oprofile...
> It seems the answer is that fwrite() does have pretty significant
> per-call overhead, at least on Fedora Core 4.  The patch I did yesterday
> still ended up making an fwrite() call every few characters when dealing
> with bytea text output, because it'd effectively do two fwrite()s per
> occurrence of '\' in the data being output.  I've committed a further
> hack that buffers a whole data row before calling fwrite().  Even though
> this presumably is adding one extra level of data copying, it seems to
> make things noticeably faster:

(semi-OT) This recoding seems like a perfect preparation for a third 
COPY format, compressed.

> Let me know what this does on your Debian machine ...

Takes a while, need a different kernel booted because the current isn't 
oprofile ready.


In response to

pgsql-hackers by date

Next:From: Gera Mel HandumonDate: 2006-05-27 12:46:13
Subject: Inserting Picture to Bytea
Previous:From: Andreas PflugDate: 2006-05-27 11:51:50
Subject: Re: XLogArchivingActive

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group