X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E25C8329C83 for ; Sun, 19 Sep 2004 21:53:13 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 07848-03 for ; Sun, 19 Sep 2004 20:53:08 +0000 (GMT) Received: from msgdirector3.onetel.net.uk (msgdirector3.onetel.net.uk [212.67.96.159]) by svr1.postgresql.org (Postfix) with ESMTP id EF43C329C7B for ; Sun, 19 Sep 2004 21:53:09 +0100 (BST) Received: from bolek.coachhouse (213-78-96-192.friaco.onetel.net.uk [213.78.96.192]) by msgdirector3.onetel.net.uk (MOS 3.4.6-GR) with ESMTP id CSL07202; Sun, 19 Sep 2004 21:53:03 +0100 (BST) Received: (Exim 3.36) #1 (Debian)) protocol: esmtp id 1C98dF-0005Ai-00 ; Sun, 19 Sep 2004 21:50:01 +0100 Message-ID: <414DF0F8.4060100@numerixtechnology.de> Date: Sun, 19 Sep 2004 21:50:00 +0100 From: T E Schmitz Reply-To: mailreg@numerixtechnology.de User-Agent: Mozilla Thunderbird 0.7 (Windows/20040616) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: Greg Stark , pgsql-sql@postgresql.org Subject: Re: ORDER BY and NULLs References: <011d01c49e5b$c88fdb20$2766f30a@development.greatgulfhomes.com> <414DB1AB.5080207@sympatico.ca> <414DB594.5000300@numerixtechnology.de> <19733.1095613137@sss.pgh.pa.us> <414DBF6D.8040500@numerixtechnology.de> <87zn3mjeaw.fsf@stark.xeocode.com> <414DEA7F.6050100@numerixtechnology.de> <21812.1095625829@sss.pgh.pa.us> In-Reply-To: <21812.1095625829@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/141 X-Sequence-Number: 18987 Hello Tom, Tom Lane wrote: > T E Schmitz writes: > >>Greg Stark wrote: >> >>>Which book is it? > > >>PostgreSQL by Korry Douglas + Susan Douglas, ISBN 0-7357-1257-3; Feb 2003 > > > Hmm, I've heard of that book but never seen it. The authors are not > participants in the PG community --- AFAICT neither of them have ever > posted anything in the mailing lists. > > >>The paragraph continues: >>"If the SELECT command included the clause WHERE phone NOT NULL, >>PostgreSQL could use the index to satisfy the ORDER BY clause. >>An index that covers optional (NOT NULL) columns will not be used to >>speed table joins either." > > > My goodness, it seems to be a veritable fount of misinformation :-( Well, that's great. My knowledge of SQL is good enough to model a DB and do run of the mill queries; but when it comes to some fine details I rely on sensible input ;-) Thanks for chipping in here and answering what I thought was a dummy question. -- Kind Regards/Gruß, Tarlika