X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id A85A79DCDD4 for ; Fri, 3 Mar 2006 08:47:12 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 41631-06 for ; Fri, 3 Mar 2006 08:47:15 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from r1.mycybernet.net (r1.mycybernet.net [209.5.206.8]) by postgresql.org (Postfix) with ESMTP id BD9D59DCC80 for ; Fri, 3 Mar 2006 08:47:09 -0400 (AST) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227]:40341 helo=phlogiston.dydns.org) by r1.mycybernet.net with esmtp (Exim 4.50 (FreeBSD)) id 1FF9gf-000GKz-9W for pgsql-sql@postgresql.org; Fri, 03 Mar 2006 07:47:13 -0500 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id CFBAC3FAF; Fri, 3 Mar 2006 07:47:12 -0500 (EST) Date: Fri, 3 Mar 2006 07:47:12 -0500 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: Sequential scan where Index scan expected (update) Message-ID: <20060303124712.GC7057@phlogiston.dyndns.org> References: <244004377.20060302124132@isb.com.pl> <2873.1141312882@sss.pgh.pa.us> <4407F031.6050706@obviously.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4407F031.6050706@obviously.com> User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.082 required=5 tests=[AWL=0.082] X-Spam-Score: 0.082 X-Spam-Level: X-Archive-Number: 200603/74 X-Sequence-Number: 24420 On Thu, Mar 02, 2006 at 11:28:49PM -0800, Bryce Nesbitt wrote: > Can anyone help figure out why? Well. . . > > > demo=# \d xx_thing ^^^^^^^^ > -------------------------+-----------------------------+----------- > thing_id | bigint | not null ^^^^^^ > demo=# explain update xx_thing_event set thing_color='foo' where ^^^^^^^^^^^^^^ . . .you haven't actually given us the right schema here, but if I had to guess, I'd say you could put this > thing_event_id=10000; ^^^^^ in quotes. The automatic int4-int8 coercion is probably your problem. Also > ---------------------------------------------------------------------------------------------------------- > PostgreSQL 7.4.1 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.3 ^^^^^ you need to upgrade PostgreSQL Right Now. There are serious problems with earlier 7.4 releases. Get the latest, or risk data corruption. A -- Andrew Sullivan | ajs@crankycanuck.ca When my information changes, I alter my conclusions. What do you do sir? --attr. John Maynard Keynes