Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 345D565039C for ; Wed, 20 Aug 2008 15:30:44 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 13566-05-3 for ; Wed, 20 Aug 2008 15:30:29 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id BE3F36501A5 for ; Wed, 20 Aug 2008 15:18:45 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m7KIIXQ0003073; Wed, 20 Aug 2008 14:18:33 -0400 (EDT) To: Decibel! cc: Gurjeet Singh , "\"=?ISO-8859-1?Q? \" Rodrigo_E. _De_Le=F3n_Plicet \" ?=\"" , "Madison Kelly" , pgsql-performance@postgresql.org Subject: Re: Optimizing a VIEW In-reply-to: <7FB7A77A-1F0B-4212-821F-06364A106A2B@decibel.org> References: <48A5CCA4.2040206@alteeve.com> <65937bea0808161919t4b0f19a0md90eae487b86429@mail.gmail.com> <7FB7A77A-1F0B-4212-821F-06364A106A2B@decibel.org> Comments: In-reply-to Decibel! message dated "Wed, 20 Aug 2008 11:49:55 -0500" Date: Wed, 20 Aug 2008 14:18:33 -0400 Message-ID: <3072.1219256313@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.87 tagged_above=0 required=5 tests=BAD_ENC_HEADER=2.87 X-Spam-Level: ** X-Archive-Number: 200808/230 X-Sequence-Number: 31111 Decibel! writes: > On Aug 16, 2008, at 9:19 PM, Gurjeet Singh wrote: >> Awesome!!!! Any comments on the performance of hstore? > I've looked at it but haven't actually used it. One thing I wish it > did was to keep a catalog somewhere of the "names" that it's seen so > that it wasn't storing them as in-line text. If you have even > moderate-length names and are storing small values you quickly end up > wasting a ton of space. > BTW, now that you can build arrays of composite types, that might be > an easy way to deal with this stuff. Create a composite type of > (name_id, value) and store that in an array. If you're worried about storage space, I wouldn't go for arrays of composite :-(. The tuple header overhead is horrendous, almost certainly a lot worse than hstore. regards, tom lane