in reply to calculation using multiple rows of a query

rocky13:

For small tables, doing the work in perl can be fine. For large tables, though, dumping the entire table through the network to compute results can be a performance problem. So I usually try to do computations involving entire tables inside the database itself. So a quick google for "SQL compute running totals" comes up with: http://www.sqlteam.com/article/calculating-running-totals showing three different ways to do the job.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

  • Comment on Re: calculation using multiple rows of a query