Re: BUG #2236: extremely slow to get unescaped bytea data

Поиск
Список
Период
Сортировка
От Kalador Tech Support
Тема Re: BUG #2236: extremely slow to get unescaped bytea data
Дата
Msg-id 43E54173.10209@kalador.com
обсуждение исходный текст
Ответ на Re: BUG #2236: extremely slow to get unescaped bytea data from db  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: BUG #2236: extremely slow to get unescaped bytea data  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-bugs
This is a table with just one entry created to test the problem.  Should
not have any indexing issues.

I've since isolated the problem to the unescape_bytea function not the
SELECT.

I inserted the same image to a bytea column using base64 encoding, and
extracted it from the table (using base64 decoding) and this worked very
fast (<1 second).  So, it is the unescape_bytea function that is to blame.

Hope that helps,

Kai Ronan
Technical Support
Kalador Entertainment Inc.



Alvaro Herrera wrote:

>Kai Ronan wrote:
>
>
>
>> // Get the bytea data
>> $res = pg_query("SELECT data FROM image WHERE name='big.gif'");
>>
>>
>
>Do you have an index in the image.name column?  What does an
>
>EXPLAIN ANALYZE SELECT data FROM image WHERE name='big.gif'
>
>say?
>
>
>

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #2238: Query failed: ERROR
Следующее
От: Martin Pitt
Дата:
Сообщение: incorrect collation order in at least some non-C locales