Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b6flx-0000sJ-Qf for pgsql-bugs@arkaria.postgresql.org; Sat, 28 May 2016 15:03:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b6flx-0004gK-Ce for pgsql-bugs@arkaria.postgresql.org; Sat, 28 May 2016 15:03:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b6flw-0004g4-P9 for pgsql-bugs@postgresql.org; Sat, 28 May 2016 15:03:28 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b6flt-0000eJ-De for pgsql-bugs@postgresql.org; Sat, 28 May 2016 15:03:28 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u4SF3BEE028978; Sat, 28 May 2016 11:03:12 -0400 From: Tom Lane To: digoal@126.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14161: reverse index scan cann't use double link? In-reply-to: <20160528095257.19427.2951@wrigleys.postgresql.org> References: <20160528095257.19427.2951@wrigleys.postgresql.org> Comments: In-reply-to digoal@126.com message dated "Sat, 28 May 2016 09:52:57 -0000" Date: Sat, 28 May 2016 11:03:11 -0400 Message-ID: <28977.1464447791@sss.pgh.pa.us> X-Pg-Spam-Score: -3.3 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org digoal@126.com writes: > in btree, leaf page has prev and next page. but when i use order by desc, > it's not use the prev page link? it scan from root per leaf page. You've provided no evidence whatsoever to support that claim. > 9 page hint = meta + root + branch + 6 leaf > 19 page hint = meta + 6(root + branch + leaf) I think more likely what's happening is that one end of the index is packed full and the other end is about 50% full. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs