Steps to resolve

1. If the MSTVF is single statement only, convert to an inline table valued function.

  1. If the MSTVF is single statement only, convert to an inline table valued function.

The inline format example is displayed next.

  1. If more complex, consider using intermediate results stored in Memory-Optimized tables

or temporary tables.

Best practices for monitoring workloads with Query Store

Sample Database for In-Memory OLTP

User-defined functions

Table Variables and Row Estimations - Part 1

Table Variables and Row Estimations - Part 2

Execution Plan Caching and Reuse