Encourage how actions take place with real tables, if you make a selection with JOIN between table functions, for example

SELECT t2.* FROM TF_MyFunc(1,DEFAULT) LEFT OUTER JOIN TF_MyFunc(1,3) t2 ON t1.id = t2.id 

The TF_MyFunc function TF_MyFunc selects data from a large amount of data according to some logic based on parameters.
I assume that functions fill in temporary tables and then a connection is made between them, or neither? if not then it is worthwhile to create temporary tables to drive the data there and then make a connection?

    1 answer 1

    Temp tables are created in the tempdb database. Why do it yourself?

    • I just didn’t know that they are being created there, so I decided to clarify that it wasn’t, well, since they are being created then there is nothing to worry about ... thanks - Acne