Re: cdb Fast Lookup

Gustavo Vieira Gonçalves Coelho Rios <[email protected]> Fri, 23 Aug 2002 22:50:16 -0300
Newsgroups gmane.comp.djb.cdb
Organization Alstom Transport Information Solution
Message-ID <[email protected]>
Gustavo Vieira Gonçalves Coelho Rios wrote:
> 
> Russ Allbery wrote:
> >
> > Gustavo Vieira Gonçalves Coelho Rios <[email protected]> writes:
> >
> > > I guess no one of you has gotten what i mean!  If you have more than a
> > > register mapping to the same hash, you are in trouble!!!!!
> >
> > > It won't be possible to direct access to the register. This will require
> > > you to probe for the correct slot!
> >
> > Yes, and...?  I don't see the problem.  (Maybe you're missing that one
> > disk read doesn't mean only one hash slot?)
> >
> > --
> > Russ Allbery ([email protected])             <http://www.eyrie.org/~eagle/>
> 
> "Effective" disk read is a block of the file system!!!!!!
> No more no less! And if you wish, you may use mmap.

Futher more!
Linear probing is no garantee on the number of disk reads! Suppose you
have a distribution of for a given key k % n == y % n, but the key y is
located in a slot very distante from k. Except in case you can have all
your data in more, this will require more than on write!