Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 56D431065C for ; Sun, 3 Nov 2013 05:17:09 +0000 (UTC) Received: (qmail 44908 invoked by uid 500); 3 Nov 2013 05:17:07 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 44715 invoked by uid 500); 3 Nov 2013 05:17:04 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 44707 invoked by uid 99); 3 Nov 2013 05:17:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Nov 2013 05:17:01 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of elecharny@gmail.com designates 74.125.82.176 as permitted sender) Received: from [74.125.82.176] (HELO mail-we0-f176.google.com) (74.125.82.176) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Nov 2013 05:16:56 +0000 Received: by mail-we0-f176.google.com with SMTP id w62so918275wes.21 for ; Sat, 02 Nov 2013 22:16:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=klb+T/u1tecKaPuqdYujQ8TyvYed/jlf5VPDSo94WF8=; b=absObhqx6vFDB7AApVzYPGgj3a88aBfC/gLKe0wwjCZTKHvnHsixVvDSg9fdnLjfM7 XVdiHq2Hon/LArIKRCUduhvOACXSnwSS17su7ewVRC0bZ0SonS88O1UewE05rxfZFam3 o5FcMIMtqTqlF8AAdqd0eRj2obY6OLU9uO7IjbYGf8yZwUwZ5lmudEQgpQqxAqAz1dW5 VzRbzj/25vvRWeXksPuGnMI72EADVHuxir9jrm6Yr4XiCSqECrBikSDMPJCRG34dk7v1 svaOBGhYQIEC/MWL6R0oBBagfPDCfNvo7o3IGf0YAjQmO5oaomrNQynDbq7lIkXKadNd SV9Q== X-Received: by 10.180.72.195 with SMTP id f3mr7524473wiv.51.1383455795580; Sat, 02 Nov 2013 22:16:35 -0700 (PDT) Received: from new-host-3.home (AMontsouris-651-1-245-70.w92-163.abo.wanadoo.fr. [92.163.20.70]) by mx.google.com with ESMTPSA id gg20sm11113226wic.1.2013.11.02.22.16.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 02 Nov 2013 22:16:34 -0700 (PDT) Message-ID: <5275DC32.10307@gmail.com> Date: Sun, 03 Nov 2013 06:16:34 +0100 From: =?UTF-8?B?RW1tYW51ZWwgTMOpY2hhcm55?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Apache Directory Developers List Subject: Re: Mavibot Partition References: <52757F1E.6050805@gmail.com> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Le 11/3/13 3:32 AM, Kiran Ayyagari a écrit : > On Sun, Nov 3, 2013 at 4:09 AM, Emmanuel Lécharny wrote: > >> Hi, >> >> today, I investigated the way the Mavibot Partition is implemented, wrt >> to the modifications I've made those past month. There are a few missing >> parts, I'm afraid. >> >> First of all, we aren't counting correctly. When we add a >> tuple, we should increment the counter regardless the fact the key >> exists or not. In other words, we count tuples, not keys. That's easy to >> fix. >> >> I think we should count the tuples, say we have a filter > (&(cn=x)(sn=y)) > > and 'cn' index has: x -> 1,2,3,4,5,6,7 > 'sn' index has: y -> 2,5 > > then the optimizer will pick up the predicate with less number of candidates > which is 'sn' here based on the count of tuples, if we count only keys > then this optimization will not work Absolutely. I fixed the code to count tuples, not keys. -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com