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

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

From: Kalador Tech Support <support(at)kalador(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2236: extremely slow to get unescaped bytea data
Date: 2006-02-05 00:06:11
Message-ID: 43E54173.10209@kalador.com (view raw or flat)
Thread:
Lists: 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?
>
>  
>

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2006-02-05 00:40:26
Subject: Re: BUG #2237: SELECT optimizer drops everything improperly
Previous:From: Alvaro HerreraDate: 2006-02-04 22:21:57
Subject: Re: BUG #2236: extremely slow to get unescaped bytea data from db

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group