On Wed, Jun 18, 2014 at 3:00 PM, Eric Rubin-Smith <eas....@gmail.com> wrote:
> Cory Nelson wrote: > > > Expand the prefix into the full feed:beef:0000:etc > > > > Insert into a table (start binary(16), mask_length int) > > > > select top 1 binary,length from table where start <= @input order by > > binary desc > > > > Check if the row is inside the range returned. This will take a single > > index seek. > > Looking at this again, I do not think the solution is correct. E.g. > assume you have populated 10m prefixes, one of which is ::/0. Assume > the search key is ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff and ::/0 > is the only covering prefix. Then your scheme will not find ::/0. And > simple extensions of your scheme involve searching through the whole set > to find ::/0. > > Correct, this will not work with overlapping blocks. -- Cory Nelson http://int64.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users