sqlster


Hi all,

I have a sql script that updates records in a table with 40 million records.

There is some functionality in the script that could be put away in functions for code reuse/elegance.

Functions would cause execution overhead.

What else could I use besides functions that would allow me the code reuse and not compromise the execution over head Is there any thing like includes in TSQL that would allow me to do so

TIA..




Re: Efficiency: 40 million records script.

Kent Waldrop Oc07


When looking at function alternatives I would suggest in this order:

  • Inline TVFs
  • Views
  • Multistatement TVFs
  • Scalar UDF

Give a look to Uma's comments in this post:

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1387102&SiteID=1






Re: Efficiency: 40 million records script.

Arnie Rowland

The action that would have the greatest impact is to attempt to create a UPDATE query that would have ONLY a single pass through the data, making all updates at one time.