X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 143339DC897 for ; Fri, 24 Mar 2006 09:06:18 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 02287-09 for ; Fri, 24 Mar 2006 09:06:21 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id EDED39DC83F for ; Fri, 24 Mar 2006 09:06:15 -0400 (AST) Received: by noel.decibel.org (Postfix, from userid 1001) id 839805644B; Fri, 24 Mar 2006 07:06:19 -0600 (CST) Received: (hashcash-sendmail, from uid 1001); Fri, 24 Mar 2006 07:06:19 -0600 Date: Fri, 24 Mar 2006 07:06:19 -0600 From: "Jim C. Nasby" To: Ruben Rubio Rey Cc: pgsql-performance@postgresql.org Subject: Re: Array performance Message-ID: <20060324130619.GF90527@pervasive.com> References: <200603170625.k2H6PJ926955@pillette.com> <1143112188.2810.27.camel@theo-laptop.int.coza.net.za> <20060323132448.GB4881@surnet.cl> <4423E90E.2090607@rentalia.com> <20060324125245.GB90527@pervasive.com> <4423EDA9.3090502@rentalia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4423EDA9.3090502@rentalia.com> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060324:ruben@rentalia.com::L8u9ChM8hFYNtFdz:0000000000000000000 0000000000000000000000000CL1 X-Hashcash: 1:20:060324:pgsql-performance@postgresql.org::6XbfeutSJtcjhije:00000 0000000000000000000000002Uhx X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.108 required=5 tests=[AWL=0.108] X-Spam-Score: 0.108 X-Spam-Level: X-Archive-Number: 200603/493 X-Sequence-Number: 17930 On Fri, Mar 24, 2006 at 02:01:29PM +0100, Ruben Rubio Rey wrote: > >http://www.varlena.com/GeneralBits/109.php might provide some useful > >insights. I also recall seeing something about sum operators for arrays, > >but I can't recall where. > > > > > I ll check it out, seems to be very useful > Is faster create a function to sum the array? There's been talk of having one, but I don't think any such thing currently exists. > >>AND array[20]<>0 > >>AND array[21]<>0 > >>... > >>AND array[50]<>0 > >>AND array[51])<>0 > >> > >> > > > >Uhm... please don't tell me that you're using 0 in place of NULL... > > > > > mmm ... i have read in postgres documentation that null values on arrays > are not supported ... Damn, you're right. Another reason I tend to stay away from them... -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461