X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E4965D94DD for ; Tue, 18 Oct 2005 15:07:14 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 33477-07 for ; Tue, 18 Oct 2005 18:07:11 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.205]) by svr1.postgresql.org (Postfix) with ESMTP id 086D2D934A for ; Tue, 18 Oct 2005 15:07:11 -0300 (ADT) Received: by wproxy.gmail.com with SMTP id i5so73225wra for ; Tue, 18 Oct 2005 11:07:13 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=iKa2NqenOAZb2NJzTYKS9zRrKJKm5S1RhSMd8gTP47TkRo7dsmhizjw2gQY19Ft6u7zBiq13/8ZQN0Nm5JvpxWDuTpQJnSMO96uUh1w/OzGdzav9kicWDlys4o1l3iR5GnCMv7eE1dAmip1Vb01l4JXND64F0cCXKvW30nUlnVU= Received: by 10.54.94.16 with SMTP id r16mr232542wrb; Tue, 18 Oct 2005 11:07:12 -0700 (PDT) Received: by 10.54.95.19 with HTTP; Tue, 18 Oct 2005 11:07:12 -0700 (PDT) Message-ID: <3cf983d0510181107sb060171je702da5fe0c29252@mail.gmail.com> Date: Tue, 18 Oct 2005 18:07:12 +0000 From: Rodrigo Madera To: pgsql-performance@postgresql.org Subject: Inefficient escape codes. MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_15569_18150319.1129658832979" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.137 required=5 tests=[AWL=-0.026, HTML_00_10=0.138, HTML_MESSAGE=0.001, RCVD_BY_IP=0.024] X-Spam-Level: X-Archive-Number: 200510/266 X-Sequence-Number: 15034 ------=_Part_15569_18150319.1129658832979 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello there, This is my first post in the list. I have a deep low-level background on computer programming, but I am totally newbie to sql databases. I am using postgres because of its commercial license. My problem is with storing large values. I have a database that stores larg= e ammounts of data (each row consisting of up to 5MB). After carefully readin= g the Postgres 8.0 manual (the version I'm using), I was told that the best option was to create a bytea field. Large objects are out of the line here since we have lots of tables. As I understand it, the client needs to put the data into the server using = a textual-based command. This makes the 5MB data grow up-to 5x, making it 25M= B in the worst case. (Example: 0x01 -> \\001). My question is: 1) Is there any way for me to send the binary field directly without needin= g escape codes? 2) Will this mean that the client actually wastes my network bandwidth converting binary data to text? Or does the client transparently manage this? Thanks for any light on the subject, Rodrigo ------=_Part_15569_18150319.1129658832979 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello there,

This is my first post in the list. I have a deep low-level background on computer programming, but I am totally newbie to sql databases. I am using postgres because of its commercial license.

My problem is with storing large values. I have a database that stores large ammounts of data (each row consisting of up to 5MB). After carefully reading the Postgres 8.0 manual (the version I'm using), I was told that the best option was to create a bytea field.

Large objects are out of the line here since we have lots of tables.

As I understand it, the client needs to put the data into the server using a textual-based command. This makes the 5MB data grow up-to 5x, making it 25MB in the worst case. (Example: 0x01 -> \\001).

My question is:

1) Is there any way for me to send the binary field directly without needin= g escape codes?
2) Will this mean that the client actually wastes my network bandwidth converting binary data to text? Or does the client transparently manage this?

Thanks for any light on the subject,
Rodrigo

------=_Part_15569_18150319.1129658832979--