[ZODB-Dev] Community opinion about search+filter

Dieter Maurer dieter at handshake.de
Wed Mar 14 14:22:35 EDT 2007

Reply restricted to "zodb-dev"...

Adam Groszer wrote at 2007-3-14 12:58 +0100:
>Currently we're looking at something based on catalog/indexes.
>As I checked the most comfortable solution would be based on
>Some questions arose:
>- Is it necessary/worth adding indexes on all attributes?

It is probably a good idea to index everything you want to
search for.

In our ZEO setup (with the ZEO client and the ZEO server on the same
machine, i.e. a fast interconnection), fetching a single object
from ZEO takes between 3 and 30 ms (depending whether the object
is in the disk cache or need to be fetched from disk) with an average
value of 4 to 5 ms.

Thus, you do not want to fetch lots of objects....

>- How does the index perform on modification and retrieval?

The usual data structures for indexes have logarithmic time complexity
for insertion and (direct) lookup.

Note however, that you may have large document list associated with
some index terms. This may give you linear time complexity for most

"IncrementalSearch2" (togoether with "ManagableIndex") tries to avoid
these linear time complexity (but can not always succeed)



More information about the ZODB-Dev mailing list