[bind10-dev] Blog comment from BDB developer

zhanglikun zlkzhy at gmail.com
Tue Jul 13 02:45:14 UTC 2010


Danny wrote:
>you have no idea how bad that would be from a DB performance point of view. You *really* don't want to do this.

>I've never heard of something like that in Java and I do quite a lot of Java programming with databases these days. I doubt that this is true.
>Databases either find the records requested or not. There's no in between. You are better off getting the resultset and processing the records for what you 
>need.

BDB have one native flag ' DB_SET_RANGE ' supporting to get records in between. see the following discussions.

> Likun,
> 
> On Fri, 2010-06-25 at 11:04 +0800, zhanglikun wrote:
> > > On Thu, 2010-06-24 at 18:00 +0000, Francis Dupont wrote:
> > > > > Best we contact them soon since we need additional functionality from
> > > > > BDB's C API to walk the zone backward as well as forward once we do a
> > find.
> > > >
> > > > => the stupid answer is to create a cursor and to use it to get
> > > > with DB_NEXT / DB_PREV. Of course this means to set comparison
> > > > functions before... Now I am not an expert in BDB when a whole
> > > > group of experts propose their help (:-)!
> > >
> > > The problem with this is that we need the DB_NEXT/DB_PREV for handling
> > > NXDOMAIN in DNSSEC. But with the C API if you get no match you doing get
> > > a cursor back, you get a "no data found" return.
> 
> <snip/>
> 
> > Use the cursor with flag "DB_SET_RANGE", since the returned key/data pair is
> > the smallest key greater than or equal to the specified key.
> >
> > see (Copied from BDB API documents):
> > {{{
> > The DB_SET_RANGE flag is identical to the DB_SET flag, except that in the
> > case of the Btree access method, the key is returned as well as the data
> > item and the returned key/data pair is the smallest key greater than or
> > equal to the specified key (as determined by the Btree comparison function),
> > permitting partial key matches and range searches.
> > }}}
> 
> <snip/>
> 
> > Hope this can provide some help, :)
> 
> Brilliant!!!
> 
> It seems like this will work - and this means BDB has pretty much full
> functionality we need for BIND 10, including DNSSEC.
> 
> --
> Shane





More information about the bind10-dev mailing list