Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Vishakha
Starting Member
40 Posts |
Posted - 2006-05-30 : 08:07:11
|
| I am working on a huge amount of data and I need to create reports.I have 3 alternativesalternative 1 --> Use stored proceduresapproachcheck if temp table exists, if yes drop itcreate one execute the store proc logic.logic includes nested stored procsalternative 2 -->Use nested UDFs and table variables to pass on the dataParent UDF uses child UDF to get the data from the table variablesalternative 3Use a mixture of store proc and UDFSince UDF in a select clause is causes performance slowdown, will using UDFs within the store procedure help the cause.Please let me know the following in terms of performance which is worse1. creating and dropping of temporary tables as there will be many such instances2. Calling nested table value UDFs.3. Third alternative I am working on, still don't know more details on how to do it.Thanks much for u'r help. |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-05-30 : 08:39:27
|
| You shouldn't need to check for existance of a temp table - it will be dropped automatically when it's out of scope.UDF's tend to be slower than most other things.If you are using v2005 have a look at common table expressions - might help.Without knowing what you are trying to do it's difficult to suggest a best approach.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|