From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp49.i.mail.ru (smtp49.i.mail.ru [94.100.177.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 1485446970E for ; Fri, 27 Dec 2019 17:20:46 +0300 (MSK) Date: Fri, 27 Dec 2019 16:20:43 +0200 From: Nikita Pettik Message-ID: <20191227142043.GJ18639@tarantool.org> References: <4189b72ec3cd58478e899ac669b5aaaf4e1077a7.1577321174.git.korablev@tarantool.org> <20191227114824.GH18639@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20191227114824.GH18639@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH] sql: fix index consideration with INDEXED BY clause List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org On 27 Dec 13:48, Nikita Pettik wrote: > On 27 Dec 14:31, Vladislav Shpilevoy wrote: > > Hi! Thanks for the patch! LGTM. > > Pushed to master. I've also backported to 2.2 (since without this fix INDEXED BY is almost useless). > > On 26/12/2019 01:48, Nikita Pettik wrote: > > > Accidentally, number of indexes to be considered during query planning > > > in presence of INDEXED BY is calculated wrong. Instead of one (INDEXED > > > BY is not a hint but requirement) index to be used (which is indicated > > > in INDEXED BY clause), all space indexes take part in query planning. > > > There are not so many tests checking this feature, so unfortunately this > > > bug was hidden. Let's fix it and force only one index to be used in QP > > > in case of INDEXED BY clause. > > > --- > > > Branch: https://github.com/tarantool/tarantool/tree/np/sql-indexed-by-fix