X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 82DE79FA5D2 for ; Thu, 15 Jun 2006 19:23:55 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 60363-05 for ; Thu, 15 Jun 2006 19:23:48 -0300 (ADT) 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 011449FA160 for ; Thu, 15 Jun 2006 19:23:48 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id B03395647A; Thu, 15 Jun 2006 17:23:47 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Thu, 15 Jun 2006 17:23:45 -0500 Date: Thu, 15 Jun 2006 17:23:45 -0500 From: "Jim C. Nasby" To: John Vincent Cc: PGSQL Performance Subject: Re: Optimizer internals Message-ID: <20060615222344.GB93655@pervasive.com> References: <1150396425.31200.66.camel@archimedes> <1150398064.31200.76.camel@archimedes> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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:060615:pgsql-performance@lusis.org::fH7H9BX9CFYcgmOl:0000000000 000000000000000000000000Bupq X-Hashcash: 1:20:060615:pgsql-performance@postgresql.org::9n64AhEY9uDBeq70:00000 000000000000000000000000IU+P X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/331 X-Sequence-Number: 19688 On Thu, Jun 15, 2006 at 03:43:09PM -0400, John Vincent wrote: > >Any suggestions? FYI the original question wasn't meant as a poke at > >comparing PG to MySQL to DB2. I'm not making an yvalue judgements either > >way. I'm just trying to understand how we can use it the best way possible. > > > >If anyone from the bizgres team is watching, have they done any work in > >this area? > > > >Thanks. > >John > > > > Actually we just thought about something. With PG, we can create an index > that is a SUM of the column where indexing, no? We're going to test this in > a few hours. Would that be able to be satisfied by an index scan? > > Also, we're looking at the link provided for the materialized views in PG. > > Thanks. decibel=# create index test on i ( sum(i) ); ERROR: cannot use aggregate function in index expression decibel=# BTW, there have been a number of proposals to negate the effect of not having visibility info in indexes. Unfortunately, none of them have come to fruition yet, mostly because it's a very difficult problem to solve. But it is something that the community would like to see happen. -- 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