[Zope] Catalog query time

Dieter Maurer dieter at handshake.de
Fri Mar 19 17:05:44 EST 2004


Kevin Carlson wrote at 2004-3-18 13:15 -0500:
>I have a single folder in a zope instance that contains about 8000 pdf 
>files.  Each of those files is indexed using TextIndexNG (1.09),  along 
>with having a Subject and Type index that are both Field indexes.  I am 
>using portal_catalog under CMF 1.2 , Zope 2.6.1, python 2.1.3.
>
>Querying the catalog has begun to take much more time recently and I am 
>wondering if there are any things that I can check into regarding what 
>might be slowing things down.  I have a simple query returned from a 
>MySQL database that in turn drives a search of the catalog on Subject 
>and Type.  I am using the following syntax:
>
>...
>query = context.getDBSubjectForUser(userID=userID)
>for q in query :
>  docResults = context.portal_catalog({'Subject' : q.subject, 'Type' : 
>'Template'})
>...
>
>This query is taking quite a while and occasionally errs out with a ZODB 
>conflict error for certain subjects returned from the database(traceback 
>below) :

I suggest you use a profiler (e.g. my "ZopeProfiler") to
find out where exactly the time is spent.

You can find "ZopeProfiler" at

  <http://www.dieter.handshake.de/pyprojects/zope>


-- 
Dieter



More information about the Zope mailing list