• Have you checked the compile time using SHOW STATISTICS TIME ON?

    Its very rare for the complile time to be affected by the amount of RAM since SQL internally reallocates space between clerks when needed.

    Here is what you can do to test , set query hint RECOMPILE within the procedure and see if it always takes the same amount of time, if not your probably looking at the difference between a warm cache and cold cache of the data in the buffer pool.

    Also have you looked at Minimum memory per query server setting?

    https://msdn.microsoft.com/en-us/library/ms191303.aspx

    Do you know you can do recompiles at the statement level?

    Keep fixed plan is a good option however it will prevent recompliles if there are any changes to the underlying schema at a later point and this can harm performance later.

    https://support.microsoft.com/en-us/kb/276220

    Jayanth Kurup[/url]