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: Very slow bytea extraction



"msmbarabino(at)virgilio(dot)it" <msmbarabino(at)virgilio(dot)it> writes:
> The test table has 36 records and each bytea field 
> contains a 250KB object. A (SELECT byteafield FROM table) takes more 
> than 1 minute to execute.

Hm, it takes about 4 seconds here, on a fairly old and slow machine:

$ time psql -A -c "select * from file" regression | wc
38 33699 26653873

real    0m4.00s
user    0m1.37s
sys     0m0.62s

In psql the trick is to use unaligned display mode, else psql itself
eats a whole lot of time trying to nicely format those 250KB rows:

$ time psql  -c "select * from file" regression | wc
40 33700 28134681

real    0m57.10s
user    0m53.55s
sys     0m0.67s

I surmise that your problem is likewise on the client side, but you
weren't very specific about what client code you were using.  Look
for bottlenecks associated with processing of very wide rows...

			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