X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D3D28D1B179 for ; Fri, 23 Jul 2004 17:56:25 -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 26140-03 for ; Fri, 23 Jul 2004 20:56:19 +0000 (GMT) Received: from smtp06.web.de (smtp06.web.de [217.72.192.224]) by svr1.postgresql.org (Postfix) with ESMTP id 69094D1B33D for ; Fri, 23 Jul 2004 17:56:16 -0300 (ADT) Received: from [62.246.34.39] (helo=hal) by smtp06.web.de with esmtp (WEB.DE 4.101 #44) id 1Bo75V-00080V-00 for pgsql-performance@postgresql.org; Fri, 23 Jul 2004 22:56:17 +0200 From: martin.bokler@web.de To: pgsql-performance@postgresql.org Date: Fri, 23 Jul 2004 23:28:15 +0200 MIME-Version: 1.0 Subject: variable length - user defined types/storage place Message-ID: <41019F0F.10384.345001@localhost> X-mailer: Pegasus Mail for Windows (v4.02) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Sender: martin.bokler@web.de X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.4 tagged_above=0.0 required=5.0 tests=NO_REAL_NAME, RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200407/164 X-Sequence-Number: 7555 Hi all, in a large table (millions of rows) I am using a variable-length user defined type to store relatively short field entries, i.e. the length of certain fields could be restricted to 2^16 or even 2^8 characters. Now I wonder whether it would be possible to save storage place, by using a smaller length field, i.e. 2 Byte or even better 1 Byte per entry instead of 4 Byte. Is there a possibility to customize the size of the length field or does Postgresql already internally optimize this? Thanks in advance, Martin.