What is the most efficient method of iterating through ZSQL rows and displaying the sum of a specific column? For example, suppose my table looks like: ------------------ |Col1 |Col2 |Col3| ------------------ |13 |51 |90 | ------------------ |23 |45 |67 | ------------------ What's the best way to sum and display the values in Col1 using a Python Script or DTML Method? My actual database is quite large, so efficiency is a concern. Thanks, Aaron abg@comco-inc.com
abg@comco-inc.com wrote:
What is the most efficient method of iterating through ZSQL rows and displaying the sum of a specific column?
Why not use your DB to calculate the sum? My strategy is to let the DB do as much work as possible. I figure, perhaps naively, that will produce the best performance most of the time. -Tim -- Tim Wilson Twin Cities, Minnesota, USA Science teacher, Linux fan, Zope developer, Grad. student, Daddy mailto:wilson@visi.com | http://qwerk.org/ | public key: 0x8C0F8813
participants (2)
-
abg@comco-inc.com -
Tim Wilson