Le 11/3/13 3:32 AM, Kiran Ayyagari a écrit : > On Sun, Nov 3, 2013 at 4:09 AM, Emmanuel Lécharny <[email protected]>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 <key, value> >> 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
