Re: Inefficient bytea escaping? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Inefficient bytea escaping?
Date
Msg-id 29666.1148674245@sss.pgh.pa.us
Whole thread Raw
In response to Re: Inefficient bytea escaping?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Inefficient bytea escaping?
List pgsql-hackers
I wrote:
> I can't test psql binary \copy just yet, but will look at applying your
> recent patch so that case can be checked.

With patch applied:

$ time psql -c "\\copy t to '/home/tgl/t.out2'" bytea

real    3m46.057s
user    0m2.724s
sys     0m36.118s
$ time psql -c "\\copy t to '/home/tgl/t.outb2' binary" bytea

real    1m5.222s
user    0m0.640s
sys     0m6.908s
$ ls -l t.*
-rw-rw-r--  1 tgl tgl 5120001024 May 26 16:02 t.out2
-rw-rw-r--  1 tgl tgl 1024006165 May 26 16:03 t.outb2

The binary time is just slightly more than what I got before for a
server COPY:

bytea=# copy t to '/home/tgl/t.out';
COPY 1024
Time: 273325.666 ms
bytea=# copy binary t to '/home/tgl/t.outb';
COPY 1024
Time: 62113.355 ms

So those numbers seem to hang together, and it's just the text case
that is not making too much sense.  I'm off for a little visit with
oprofile...
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: XLogArchivingActive
Next
From: "Jim C. Nasby"
Date:
Subject: Re: XLogArchivingActive