X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 13C71D1B544 for ; Tue, 11 Nov 2003 18:16:46 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 00243-01 for ; Tue, 11 Nov 2003 14:16:16 -0400 (AST) Received: from ganymede.hub.org (u46n208.hfx.eastlink.ca [24.222.46.208]) by svr1.postgresql.org (Postfix) with ESMTP id E9DDED1B550 for ; Tue, 11 Nov 2003 14:16:08 -0400 (AST) Received: by ganymede.hub.org (Postfix, from userid 1000) id 4F6D837603; Tue, 11 Nov 2003 14:14:01 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id 4E99D37512; Tue, 11 Nov 2003 14:14:01 -0400 (AST) Date: Tue, 11 Nov 2003 14:14:01 -0400 (AST) From: "Marc G. Fournier" X-X-Sender: scrappy@ganymede.hub.org To: Greg Stark Cc: Dennis Bjorklund , pgsql-performance@postgresql.org Subject: Re: *very* slow query to summarize data for a month ... In-Reply-To: <878ymmkdb9.fsf@stark.dyndns.tv> Message-ID: <20031111141328.X56037@ganymede.hub.org> References: <878ymmkdb9.fsf@stark.dyndns.tv> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/41 X-Sequence-Number: 4601 On Tue, 11 Nov 2003, Greg Stark wrote: > Actually you might be able to get the same effect using function indexes > like: > > create index i on traffic_log (month_trunc(runtime), company_id) had actually thought of that one ... is it something that is only available in v7.4? ams=# create index i on traffic_logs ( month_trunc(runtime), company_id ); ERROR: parser: parse error at or near "," at character 54