Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id EB5249FB1FB for ; Sat, 27 Jan 2007 06:44:39 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 36632-01 for ; Sat, 27 Jan 2007 06:44:26 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail.trinitydigital.com.au (unknown [202.134.38.99]) by postgresql.org (Postfix) with ESMTP id 66A319FA473 for ; Sat, 27 Jan 2007 06:44:35 -0400 (AST) Received: from [172.17.73.3] (unknown [202.134.38.110]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.trinitydigital.com.au (Postfix) with ESMTP id 3D2FB4CC; Sat, 27 Jan 2007 21:44:23 +1100 (EST) Message-ID: <45BB2CFA.50609@pws.com.au> Date: Sat, 27 Jan 2007 21:44:10 +1100 From: Russell Smith User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Guido Neitzer CC: PostgreSQL Performance Subject: Re: Seqscan/Indexscan still a known issue? References: <45BAB682.6060709@mochima.com> <45BB00BB.4070009@pws.com.au> <58F562A7-2925-4E37-BEA7-3D26748D408A@event-s.net> In-Reply-To: <58F562A7-2925-4E37-BEA7-3D26748D408A@event-s.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/382 X-Sequence-Number: 22983 Guido Neitzer wrote: > On 27.01.2007, at 00:35, Russell Smith wrote: > >> Guess 1 would be that your primary key is int8, but can't be certain >> that is what's causing the problem. > > Why could that be a problem? Before 8.0, the planner would not choose an index scan if the types were different int8_col = const, int8_col = 4. 4 in this example is cast to int4. int8 != int4. So the planner will not choose an index scan. Regards Russell Smith > > cug > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq > >