Re: Very slow bytea extraction

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Very slow bytea extraction
Дата
Msg-id 22731.1174518062@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Very slow bytea extraction  ("msmbarabino@virgilio.it" <msmbarabino@virgilio.it>)
Список pgsql-bugs
"msmbarabino@virgilio.it" <msmbarabino@virgilio.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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [cstdenis@ctgameinfo.com: Re: BUG #3179: crash when canceling avacuum]
Следующее
От: TANIDA Yutaka
Дата:
Сообщение: "Relation not found" error but table exits.