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 8B6C39DC9AD for ; Tue, 17 Jan 2006 20:23:33 -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 74454-04 for ; Tue, 17 Jan 2006 20:23:36 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from bob.planeti.biz (unknown [66.98.130.45]) by postgresql.org (Postfix) with ESMTP id 75F3D9DC80F for ; Tue, 17 Jan 2006 20:23:31 -0400 (AST) Received: from fatchubby (cpe-071-070-134-248.nc.res.rr.com [71.70.134.248]) by bob.planeti.biz (8.12.10/8.12.5) with SMTP id k0I0EifR014288; Tue, 17 Jan 2006 19:14:44 -0500 From: J@Planeti.Biz Message-ID: <003201c61bc5$6652d690$81300d05@fatchubby> To: "Stephan Szabo" Cc: "Josh Berkus" , References: <05c301c61bb1$d88c6a00$681e140a@fatchubby> <200601171425.38772.josh@agliodbs.com> <20060117143952.D47156@megazone.bigpanda.com> <063d01c61bba$2d97fc00$681e140a@fatchubby> <20060117152915.T50406@megazone.bigpanda.com> Subject: Re: Multiple Order By Criteria Date: Tue, 17 Jan 2006 19:23:25 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.644 required=5 tests=[AWL=-0.075, BIZ_TLD=1.169, NO_REAL_NAME=0.55] X-Spam-Score: 1.644 X-Spam-Level: * X-Archive-Number: 200601/279 X-Sequence-Number: 16757 I've read all of this info, closely. I wish when I was searching for an answer for my problem these pages came up. Oh well. I am getting an idea of what I need to do to make this work well. I was wondering if there is more information to read on how to implement this solution in a more simple way. Much of what's written seems to be towards an audience that should understand certain things automatically. ----- Original Message ----- From: "Stephan Szabo" To: Cc: "Josh Berkus" ; Sent: Tuesday, January 17, 2006 6:39 PM Subject: Re: [PERFORM] Multiple Order By Criteria > > 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 > > ---------------------------(end of broadcast)--------------------------- > TIP 6: explain analyze is your friend >