[Zope-CMF] Catalog: Adding indexes or waking up objects?

Rainer Thaden Rainer Thaden <thadi@gmx.de>
Thu, 22 Aug 2002 14:14:45 +0200


Hi,

let's say we have several classes whose instances reference eachother
in the views or edit forms e.g. an employee and projects which
reference an employee.
In the edit form all employees are listed by their names. To get the
names out of the instances i first do a portal_catalog.searchResults
and then use getObject which means waking up the object.
Another way would be to add an index to the catalog which contains the
name so i can pull it out of the brain.

Are there any recommendations on the performance of these methods
depending on the number of objects?
Let's say there are only up to 30 employees. Is it critical to wake up
30 objects?
If i add indexes 'firstname' and 'lastname' they would be useless for
all other types.
Does it matter to add lots of indexes? Does the catalog performance
decrease?

Any thoughts?

-- 
Gruß,
 Rainer                          mailto:thadi@gmx.de