[Zope] Re: Catalog reindexing: field by field or not?

Lennart Regebro regebro at nuxeo.com
Fri Feb 20 12:54:50 EST 2004


From: "Casey Duncan" <casey at zope.com>
> I'm not sure I understand the question.

OK, I'll try to clarify. If you update all of the catalog, you'll go through
all the objects once, and reindex them. If you reindex, say, five indexes,
you'll go through all objects five times.

My question is basically: Which of these are faster? It seems to me that the
first one should be. And then the optimization of mentioning which indexes
to reindex in fact makes it slower.

I just want to make sure that this is the case, and that I haven't
misunderstood everything.

> It looks to me like this could be optimized by only doing one pass
> through the objects and calling catalog_object() with multiple indexes
> instead of the current implementation which does one pass over all
> objects per index.

Yup. But at the moment I'm talking asa Zope user, and not a Zope developer,
so from my current point of view that's not an option. ;-)

> Perhaps, except that reindexing the whole catalog also updates metadata
> whereas reindexing indexes individually does not. So it would depend how
> much metadata you have.

Ah. Well, that makes is a bit better. But I'll probably still update the
whole catalog as soon as more than one index needs to be reindexed. It
should make things much faster on a big instance, since what takes time
there would be to load all the objects twice...





More information about the Zope mailing list