Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YYUVE-0000lJ-3p for pgsql-performance@arkaria.postgresql.org; Thu, 19 Mar 2015 07:04:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YYUVD-0004Qk-Ao for pgsql-performance@arkaria.postgresql.org; Thu, 19 Mar 2015 07:04:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YYUVC-0004Qe-IX for pgsql-performance@postgresql.org; Thu, 19 Mar 2015 07:04:22 +0000 Received: from mwork.nabble.com ([162.253.133.43]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YYUV8-0004eH-KV for pgsql-performance@postgresql.org; Thu, 19 Mar 2015 07:04:21 +0000 Received: from msam.nabble.com (unknown [162.253.133.85]) by mwork.nabble.com (Postfix) with ESMTP id 97C9717D618B for ; Thu, 19 Mar 2015 00:04:22 -0700 (PDT) Date: Thu, 19 Mar 2015 00:04:10 -0700 (MST) From: Jake Magner To: pgsql-performance@postgresql.org Message-ID: <1426748650278-5842527.post@n5.nabble.com> In-Reply-To: References: <1426746214298-5842523.post@n5.nabble.com> Subject: Re: Merge Join chooses very slow index scan MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -0.1 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org random_page_cost = 4 seq_page_cost = 1 Regardless of the the choice to use the index scan and random access to the rows, how come in the second query with the freq > -1 condition, it accesses far fewer pages with the same index scan even though no rows are filtered out? Thanks -- View this message in context: http://postgresql.nabble.com/Merge-Join-chooses-very-slow-index-scan-tp5842523p5842527.html Sent from the PostgreSQL - performance mailing list archive at Nabble.com. -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance