Disable Parameter Sniffing in SQL, disable "cursor preparation"
Actually you can already disable the cursor preparation in NAV by adding a value to the "diagnostics" in "$ndo$dbproperty":
update [dbo].[$ndo$dbproperty] set [diagnostics] = [diagnostics] + 1048576
..requires NAV 5.0 SP1 Update 1 or higher.
Leggi tutto il post...