Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aCuT6-0008Nt-6I for pgsql-hackers@arkaria.postgresql.org; Sat, 26 Dec 2015 19:25:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aCuT5-0004B1-5T for pgsql-hackers@arkaria.postgresql.org; Sat, 26 Dec 2015 19:25:31 +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) (envelope-from ) id 1aCuT2-00049Q-2P for pgsql-hackers@postgresql.org; Sat, 26 Dec 2015 19:25:28 +0000 Received: from hook.sigaev.ru ([93.180.27.50]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aCuSu-0003g4-AW for pgsql-hackers@postgresql.org; Sat, 26 Dec 2015 19:25:27 +0000 Received: from xor.sai.msu.ru (93-80-5-82.broadband.corbina.ru [93.80.5.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: teodor) by hook.sigaev.ru (Postfix) with ESMTPSA id AC8CAB191C0; Sat, 26 Dec 2015 22:25:19 +0300 (MSK) Subject: Re: POC, WIP: OR-clause support for indexes To: Feng Tian Cc: Pgsql Hackers References: <567ED6CA.2040504@sigaev.ru> From: Teodor Sigaev Message-ID: <567EE99F.8040607@sigaev.ru> Date: Sat, 26 Dec 2015 22:25:19 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org > This is great. I got a question, is it possible make btree index to support OR > as well? Is btree supports more invasive, in the sense that we need to do > enhance ScanKey to supports an array of values? Btree now works by follow: find the max/min tuple which satisfies condtions and then executes forward/backward scan over leaf pages. For complicated clauses it's not obvious how to find min/max tuple. Scanning whole index isn't an option from preformance point of view. -- Teodor Sigaev E-mail: teodor@sigaev.ru WWW: http://www.sigaev.ru/ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers