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?
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq