Re: bytea performance issue

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: bytea performance issue
Дата
Msg-id 16778.1169786477@sss.pgh.pa.us
обсуждение исходный текст
Ответ на bytea performance issue  (brian stone <skye0507@yahoo.com>)
Ответы Re: bytea performance issue  (brian stone <skye0507@yahoo.com>)
Список pgsql-general
brian stone <skye0507@yahoo.com> writes:
> I have to store binary data in a table, ranging from 512K - 1M.  I am getting very poor performance when inserting
thisdata. 
> create table my_stuff (data bytea);
> I then try to insert 10 1M blobs into this table using PQexecParams from C.  It takes ~10 seconds to insert the 10
records. 
> The test is being performed locally so this is not a network issue.  If I change the data I send from the client to
1Mworth of text, and change the 'my_stuff.data' to TEXT, the same test takes ~2 seconds.  Has anyone else seen this
performanceissue with bytea? 

How are you transmitting the data exactly?  Have you tried using
oprofile or some such to identify the culprit?

It does sound like escaping could be the issue, except that if you're
sending binary parameters as your message suggests (but doesn't actually
say) then there shouldn't be any escape processing going on.

            regards, tom lane

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

Предыдущее
От: Iannsp
Дата:
Сообщение: DBLink contrib used for replication
Следующее
От: brian stone
Дата:
Сообщение: Re: bytea performance issue