I have a stored procedure that does a fairly complicated search. The first time it runs, it takes about 3 or 4 seconds. Subsequent repeated calls can be very fast - show as zero seconds in query manager, or a similar time to the first run, about 3 seconds. It's not predictable, it may run in zero seconds 3 or 4 times, then slow again. Any ideas what is going on, or how I could try to diagnose what is happening? The procedure uses a temporary table, which seems to stop a query execution plan being viewed. It reports "Invalid object name '#mytable'." Thanks for any ideas.