Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 974599F9AC6 for ; Wed, 31 Oct 2007 06:38:35 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 99293-03 for ; Wed, 31 Oct 2007 06:38:11 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by postgresql.org (Postfix) with ESMTP id 9904F9F9AA6 for ; Wed, 31 Oct 2007 06:38:33 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.1/8.14.1) with ESMTP id l9V9cT4E014771 for ; Wed, 31 Oct 2007 06:38:29 -0300 (ADT) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.1/8.14.1/Submit) id l9V9bNMj014688 for pgsql-performance@postgresql.org; Wed, 31 Oct 2007 06:37:23 -0300 (ADT) (envelope-from news) From: cluster X-Newsgroups: pgsql.performance Subject: Re: Two fast queries get slow when combined Date: Wed, 31 Oct 2007 10:37:24 +0100 Organization: Hub.Org Networking Services Lines: 11 Message-ID: References: <4727A645.2040302@enterprisedb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org User-Agent: Thunderbird 1.5.0.14pre (X11/20071023) In-Reply-To: <4727A645.2040302@enterprisedb.com> To: pgsql-performance@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/372 X-Sequence-Number: 27394 > There's something odd about that plan. It's doing both a seq scan and a > bitmap scan on "items", but I can't see stats table being mentioned > anywhere. Huh? Aaah, sorry. I made a major search/replace-refactoring (that obviously went wrong) on all open files in the editor before posting to this newsgroup, and one of these files was my preparation of the queries and planner output. Damn. Sorry for wasting your time! :-( However, your suggestion worked perfectly. Thanks a lot!