a1x,
Thanks for the response. What I need to do is to compute the value, and make the freshly computed value available to the next step of the algorithm. I'm currently doing this by UPDATING before stepping forward. What I'm hoping to be able to do is to only SELECT that value (and thereby avoid the write and increase performance).
I need to do this on 1.5 million records simultaneously - not one at a time. Also, I have built a UDF to accomplish this, but it didn't perform faster than the original approach using the UPDATE statement.
Thanks for the help...
-ash
Main Topics
Browse All Topics





by: a1xPosted on 2008-02-07 at 13:07:56ID: 20845205
Are you updating a record or do you just need to do a select that summarizes data?
UDF's can work if you are working with only one record in your select. UDF's seem to run for each record, so if your select has very many records, it is very expensive.
If you can get past the strict requirements, Indexed Views can be useful for summarization. The overhead of the calculation is incurred on the INSERT rather than the SELECT, and SQL Server enforces the integrity of the calculation.