3

I was trying to optimize a query and found that the plan had table spool(eager) in it. But when I ran it on another server which had much more memory(256GB compared to 64GB) than the other one the operator was gone and the query was much faster.

So I am wondering if that memory is even the cause of the plan change which I see ie is it even a plausible theory?

volume of Data is the same.

DMDM
  • 1,750
  • 2
  • 16
  • 36

1 Answers1

-2

SQL Server needs to have a reasonably correct estimate of how many rows your query is going to handle. If it doesn’t, things can go terribly, terribly wrong.

MOre info

https://www.brentozar.com/archive/2013/08/query-plans-what-happens-when-row-estimates-get-high/

Kumar Reddy
  • 286
  • 1
  • 9