From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andreas Pflug <pgadmin(at)pse-consulting(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Inefficient bytea escaping? |
Date: | 2006-05-26 20:10:45 |
Message-ID: | 29666.1148674245@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Jim C. Nasby | 2006-05-26 20:11:11 | Re: XLogArchivingActive |
Previous Message | Jim C. Nasby | 2006-05-26 20:01:15 | Re: XLogArchivingActive |