<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title></title>
</head>
<body>
Christian Reis wrote:
<blockquote type="cite" cite="mid20030904205538.GB6270@async.com.br">
  <pre wrap=""></pre>
  <blockquote type="cite">
    <pre wrap="">My algorythm accelerates searching in many cases from times to 
magnitudes (depending on template and data variations) comparing to 
traditional approach of standard Berkeley DB API. I'd like to have and 
use the same thing in ZODB.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Question: does the template necessarily have a fixed number of
characters, or is something like the * wildcard supported too?
  </pre>
</blockquote>
Well, when searching using my method, need to supply a estimation function
getting first and last key of the interval and returning one of 3 possible
answers:<br>
1. There are no suitable keys inside the interval [first, last).<br>
2. All of the keys are sutable.<br>
3. Some of the keys inside maybe suitable, some of them -- maybe not (worst
case). In this case, we need to divide interval into parts and estimate every
part separately.<br>
First estimation on a specific B-tree is on the first and the last keys interval
of the whole tree (first key usually stored in the root page -- I do not
know ZODB B-tree specifics). Next estimations (if 1st estimation returns
3) are on parts of root (and possibly child) pages.<br>
So (as I understood), in case of * wildcard we cannot estimate intervals
efficently, so, in case of *, the benefit is not big, if exists at all.<br>
<br>
Thank you.<br>
VV<br>
</body>
</html>