As I stated in previous posts I've inherited a warehouse based on SQL Server framework.
In my continuous review of existing components and the practices adopted by the predecessors I found something that caught my attention and surprised me: there are several places where physical tables are being used as temporal tables to manipulate large amounts of data. First reaction was to think this practice is very expensive for the DBMS but would like to have more feedback on that.
Some annotations on this topic:
- Physical tables being created/droped within SPs ( tables called "TMP_TableName")
- Tables mostly used to manipulate large amount of data
- Mentioned SPs calls several times during daily night processing
Questions:
- Does this practice brings up any advantage to the processing routines that I'm not aware of?
- Are there best practices about this?
- My plan is to update the code to use #temp tables to improve the performance. Comments on that?.
- Should I consider to use variable tables? I read the performance is bad when treating with big data.
I appreciate any feedback based on your knowlege/experience you may want to share with all the stackoverflowers.
Thanks in advance,