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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Inefficient bytea escaping?


  • 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: Fri, 26 May 2006 16:10:45 -0400
  • Message-id: <29666(dot)1148674245(at)sss(dot)pgh(dot)pa(dot)us>

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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group