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 846B89DC841 for ; Tue, 17 Jan 2006 19:39:02 -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 66093-03 for ; Tue, 17 Jan 2006 19:39:04 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by postgresql.org (Postfix) with ESMTP id 60D519DC80F for ; Tue, 17 Jan 2006 19:39:00 -0400 (AST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 9D73435784; Tue, 17 Jan 2006 15:39:03 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 99878356B3; Tue, 17 Jan 2006 15:39:03 -0800 (PST) Date: Tue, 17 Jan 2006 15:39:03 -0800 (PST) From: Stephan Szabo To: J@Planeti.Biz Cc: Josh Berkus , pgsql-performance@postgresql.org Subject: Re: Multiple Order By Criteria In-Reply-To: <063d01c61bba$2d97fc00$681e140a@fatchubby> Message-ID: <20060117152915.T50406@megazone.bigpanda.com> References: <05c301c61bb1$d88c6a00$681e140a@fatchubby> <200601171425.38772.josh@agliodbs.com> <20060117143952.D47156@megazone.bigpanda.com> <063d01c61bba$2d97fc00$681e140a@fatchubby> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.67 required=5 tests=[AWL=-0.499, BIZ_TLD=1.169] X-Spam-Score: 0.67 X-Spam-Level: X-Archive-Number: 200601/278 X-Sequence-Number: 16756 On Tue, 17 Jan 2006 J@Planeti.Biz wrote: > I created the index like this: > > CREATE INDEX rcbee_idx > ON detail_summary > USING btree > (receipt, carrier_id, batchnum, encounternum, encounter_id); > > Is this correct ? That would work if you were asking for all the columns ascending or descending, but we don't currently use it for mixed orders. > How do I make a reverse opclass ? There's some information at the following: http://archives.postgresql.org/pgsql-novice/2005-10/msg00254.php http://archives.postgresql.org/pgsql-general/2005-01/msg00121.php http://archives.postgresql.org/pgsql-general/2004-06/msg00565.php