Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 057A3650188 for ; Sat, 16 Aug 2008 22:36:26 -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 21344-02 for ; Sat, 16 Aug 2008 22:36:17 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.227]) by postgresql.org (Postfix) with ESMTP id 4A96D64FD3E for ; Sat, 16 Aug 2008 22:36:23 -0300 (ADT) Received: by rv-out-0506.google.com with SMTP id b25so2446379rvf.43 for ; Sat, 16 Aug 2008 18:36:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=ncYzB9fklAH6EO5XlWZ59pydiF/uyHQf8tfs2acZ7YI=; b=KhICGA5qADtFkFMspRhGtx7sgeeK8iCoTJZgNj4+33+tsGlt0Mn8W3IMuou+fcX5MZ Bbwnj3sbQsHmPCCI7WwKeaoOOi6VIx2j6y+XDe6kfepXDXK/7mNvF1xWtpya3JoGq+1x qcQ2bA15OwVFegjenfrC3J5RL4O3sGdd1qw7o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=o07e6a1G5OH73GfCDExjPYzLyEVzftOYhAspN2+vP9d/9bTg6TljAciFXkfFDDP9Bh HldRjrllZ7RS96ZvEDf2B0YUjwXrufBkUXaq5TjOJY1/b4I3fixZtviXYGv75qXX0xKg MU9k6/yf2IyUvq3CVY6YNpP9vCP/wtXqjvJEQ= Received: by 10.141.176.13 with SMTP id d13mr2400567rvp.196.1218936981701; Sat, 16 Aug 2008 18:36:21 -0700 (PDT) Received: by 10.141.177.18 with HTTP; Sat, 16 Aug 2008 18:36:21 -0700 (PDT) Message-ID: Date: Sat, 16 Aug 2008 20:36:21 -0500 From: "=?UTF-8?Q?Rodrigo_E._De_Le=C3=B3n_Plicet?=" To: "Madison Kelly" Subject: Re: Optimizing a VIEW Cc: pgsql-performance@postgresql.org In-Reply-To: <48A5CCA4.2040206@alteeve.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48A5CCA4.2040206@alteeve.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200808/182 X-Sequence-Number: 31063 On Fri, Aug 15, 2008 at 1:36 PM, Madison Kelly wrote: > The 'cust_id' references the customer that the given data belongs to. The > reason for this "data bucket" (does this structure have a proper name?) is > that the data I need to store on a give customer is quite variable and > outside of my control. As it is, there is about 400 different variable/value > pairs I need to store per customer. For you very specific case, I recommend you check out contrib/hstore: http://www.postgresql.org/docs/current/static/hstore.html