Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id E278C9FB30A for ; Sat, 27 Jan 2007 17:10:13 -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 07981-04 for ; Sat, 27 Jan 2007 17:10:08 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by postgresql.org (Postfix) with ESMTP id B31529FB30E for ; Sat, 27 Jan 2007 17:10:10 -0400 (AST) Received: from [207.253.109.148] by VL-MH-MR002.ip.videotron.ca (Sun Java System Messaging Server 6.2-2.05 (built Apr 28 2005)) with ESMTP id <0JCJ00KOYPGUN860@VL-MH-MR002.ip.videotron.ca> for pgsql-performance@postgresql.org; Sat, 27 Jan 2007 16:10:09 -0500 (EST) Date: Sat, 27 Jan 2007 16:14:44 -0500 From: Carlos Moreno Subject: Re: Seqscan/Indexscan still a known issue? In-reply-to: <6888.1169918891@sss.pgh.pa.us> Cc: pgsql-performance@postgresql.org Message-id: <45BBC0C4.9020204@mochima.com> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en References: <45BAB682.6060709@mochima.com> <45BB214E.3090907@fuzzy.cz> <45BB873C.4000304@mochima.com> <6888.1169918891@sss.pgh.pa.us> User-Agent: Mozilla Thunderbird 1.0.8-1.1.fc4 (X11/20060501) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/386 X-Sequence-Number: 22987 Tom Lane wrote: > One reason you might consider updating is that newer versions check the > >physical table size instead of unconditionally believing >pg_class.relpages/reltuples. Thus, they're much less likely to get >fooled when a table has grown substantially since it was last vacuumed >or analyzed. > > Sounds good. Obviously, there seem to be plenty of reasons to upgrade, as pointed out in several of the previous replies; I would not rank this one as one of the top reasons to upgrade, since every time I've encountered this issue (planner selecting seq. scan when I'm convinced it should choose an index scan), I can always get away with forcing it to use an index scan, even if it feels like the wrong solution. But still, I guess what you point out comes as part of an array of improvements that will contribute to much better performance anyway! I'm sure I've said it countless times, but it feels again like the right time to say it: thank you so much for all the help and all the effort the PG team has put in making this such a great product --- improvement after improvement! Thanks, Carlos --