[Zope] Faster ZCatalog Searches (better? Optimized?)

Toby Dickenson tdickenson@geminidataloggers.com
Mon, 29 Apr 2002 10:45:51 +0100


On Fri, 26 Apr 2002 14:26:39 -0400, BZ <bz@bwanazulia.com> wrote:

>ZUBB:
><dtml-in "searchResults(in_reply_to=3D[''])" size=3Dbatch_size reverse=20
>sort=3Did start=3Dquery_start>

You are are getting dtml-in to do the sorting, not the catalog. The
difference may be very small, or very large

Try this (untested) code as a perfomance test

<dtml-in "searchResults(in_reply_to=3D[''],sort_on=3D'id')"
size=3Dbatch_size=20
start=3Dquery_start>

That should be faster, but reverses the sort order. In not sure if
putting the 'reverse' dtml-in tag back in will incur a performance
penalty.


I have recently committed some significant micro-optimisations to the
the catalog for sorted queries, which have improved the runtime for
some of my queries by a factor of 8. If you want these, they are
currently in the CVS trunk and will definitely go into 2.6.



Toby Dickenson
tdickenson@geminidataloggers.com