indexing - Do SQL Server functions such as inline table-values functions persist? -


i aware derived table , common table expression (cte) not persist. live in memory til end of outer query. every call repeated execution.

do functions such inline table-valued functions persist, meaning calculated once ? can index inline table-valued function?

inline function same thing view or cte, except has parameters. if @ query plan you'll see logic function included in query using -- no, can't index , sql server doesn't cache it's results such, of course pages in buffer pool future use.

i wouldn't each call cte repeated execution either, since sql server can freely decide how run query, long results correct.

for multi statement udf each of calls (at least in versions 2014) separate executions, far know, every time, , not cached in sense assume mean.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -