Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U7OJa-00082P-JG for pgsql-sql@arkaria.postgresql.org; Mon, 18 Feb 2013 10:51:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U7OJZ-00044c-45 for pgsql-sql@arkaria.postgresql.org; Mon, 18 Feb 2013 10:51:17 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U7OJY-00044W-6G for pgsql-sql@postgresql.org; Mon, 18 Feb 2013 10:51:16 +0000 Received: from uvena.de ([2001:4d88:1ffc:463::5]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U7OJW-0002o4-OH for pgsql-sql@postgresql.org; Mon, 18 Feb 2013 10:51:15 +0000 Received: from [10.164.1.100] (unknown [62.214.71.244]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by uvena.de (Postfix) with ESMTPSA id 6DA5BBC376 for ; Mon, 18 Feb 2013 10:51:11 +0000 (UTC) Message-ID: <5122079F.6090306@frank.uvena.de> Date: Mon, 18 Feb 2013 11:51:11 +0100 From: Frank Lanitz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: query doesn't always follow 'correct' path.. References: In-Reply-To: X-Enigmail-Version: 1.5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org Am 18.02.2013 10:43, schrieb Bert: > Does anyone has an idea what triggers this bad plan, and how I can fix it? Looks a bit like wrong statistics. Are the statistiks for your tables correct? Cheers, Frank -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql