Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1AI7ix74156 for ; Sat, 10 Feb 2001 13:07:44 -0500 (EST) (envelope-from josh@agliodbs.com) Received: from [63.195.55.98] (HELO agliodbs.com) by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.3) with ESMTP id 1189003 for pgsql-sql@postgresql.org; Sat, 10 Feb 2001 10:07:42 -0800 Message-ID: <3A85826C.D8A40CFF@agliodbs.com> Date: Sat, 10 Feb 2001 10:03:24 -0800 From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions X-Mailer: Mozilla 4.73 [en] (Win98; I) X-Accept-Language: en MIME-Version: 1.0 To: sqllist Subject: Re: How to make operator class? References: <20010210185907.HM.40000000001W64L@www5.hanmail.net> <3775.981823086@sss.pgh.pa.us> <3A858055.4B68C109@agliodbs.com> <4348.981828101@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200102/194 X-Sequence-Number: 1381 Tom, > > Hmmm .... thinking about it logically, shouldn't the database engine be > > able to use an index on a single column either backwards or forwards? > > Sure, but he wanted a sort with the first column in ascending order and > the second in descending order. You can't get that by scanning an index > that has both columns in the same order... Aha. I see the problem. My approach would be to use two seperate indexes, but maybe that's not sophisticated enough :-) And, Tom, you're working too hard again. It's Saturday. Go home. -Josh Berkus (Who is home, just VPN'ing into my office). -- ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco