X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 64B8F3A5C41 for ; Thu, 27 Jan 2005 15:20:56 +0000 (GMT) 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 72954-06 for ; Thu, 27 Jan 2005 15:20:48 +0000 (GMT) Received: from server.cityscape3d.com (unknown [217.206.144.18]) by svr1.postgresql.org (Postfix) with ESMTP id 331043A5F06 for ; Thu, 27 Jan 2005 15:20:48 +0000 (GMT) Received: from [192.168.1.117] ([192.168.1.117]) by server.cityscape3d.com (8.12.11/8.11.6) with ESMTP id j0RExVSq035581; Thu, 27 Jan 2005 14:59:39 GMT (envelope-from chriskl@familyhealth.com.au) Received: from 127.0.0.1 (AVG SMTP 7.0.302 [265.7.5]); Thu, 27 Jan 2005 15:19:41 +0000 Message-ID: <41F9068D.4080507@familyhealth.com.au> Date: Thu, 27 Jan 2005 15:19:41 +0000 From: Christopher Kings-Lynne User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mitch Pirtle Cc: pgsql-performance@postgresql.org Subject: Re: SQL Performance Guidelines References: <330532b605012706502e298c77@mail.gmail.com> In-Reply-To: <330532b605012706502e298c77@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.02 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/538 X-Sequence-Number: 10228 > For example, IIRC when joining an integer column with a SERIAL column, > you must expicitly cast it as an integer or the planner will not use > the indexes, right? (This is a guess, as I remember reading something > like this and thinking, "How in the world is someone supposed to > figure that out, even with EXPLAIN?") That's not true at all. Perhaps you're thinking about BIGSERIAL and int8 indexes - something that's been addressed in 8.0. Chris