[Zope] Ri:Re: Z-SQL Method performance
Stefano Vedovelli
spinwing@inwind.it
Thu, 4 Apr 2002 10:22:07 +0200
>It's almost surely not the Z SQL Method but the DTML rendering that
>makes it slow.
The DTML needs to calculate the total number of pages to build the
browsing mechanism. A big resultset will cause a complete
loadup of the records in the internal ZSQL Result object and therefore
not only a slowdown, but also an increased memory request. Multiply
this for many concurrent users, and you can figure the result by yourself.
Moving it to an external method can partially solve the problem, but
because you have to use the internal ZSQL machinery, due to caching
and connection pooling reasons, then you still have to pay attention
to what are you doing with the database.
IMHO, what you can do is to create a two-step selection. Supposing
you are providing a list of customers, you request the user to choose
the starting letter. This way, out of the 10.000 records, showing only
the ones starting with "A" will break down to a far smaller number, thus
reducing the overall overhead.
Hope this helps.
Rgds
Stefano