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 791F4329E82 for ; Mon, 20 Sep 2004 09:06:34 +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 38771-06 for ; Mon, 20 Sep 2004 08:06:28 +0000 (GMT) Received: from msgdirector4.onetel.net.uk (msgdirector4.onetel.net.uk [212.67.96.160]) by svr1.postgresql.org (Postfix) with ESMTP id BE9F3329E8A for ; Mon, 20 Sep 2004 09:06:28 +0100 (BST) Received: from bolek.coachhouse (213-78-120-71.friaco.onetel.net.uk [213.78.120.71]) by msgdirector4.onetel.net.uk (MOS 3.4.6-GR) with ESMTP id CGC34768; Mon, 20 Sep 2004 09:04:40 +0100 (BST) Received: (Exim 3.36) #1 (Debian)) protocol: esmtp id 1C9J9u-0005Lz-00 ; Mon, 20 Sep 2004 09:04:26 +0100 Message-ID: <414E8F0A.6020602@numerixtechnology.de> Date: Mon, 20 Sep 2004 09:04:26 +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: Greg Stark , tgl@sss.pgh.pa.us Cc: 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> <874qltkbjc.fsf@stark.xeocode.com> In-Reply-To: <874qltkbjc.fsf@stark.xeocode.com> 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/153 X-Sequence-Number: 18999 Hello, Greg Stark wrote: > Tom Lane writes: > > >>>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 :-( >> > I wonder if they just tried explain on a bunch of queries and noticed that > postgres wasn't using an index for SELECT * FROM foo ORDER BY bar and came up > with explanations for the patterns they saw? This paragraph was in the chapter about PostgreSQL indexing and the paragraph itself was entitled "Indexes and Null values". -- Regards/Gruß, Tarlika Elisabeth Schmitz