Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange behaviour: include execution plan to improve performance

Status
Not open for further replies.

Crowley16

Technical User
Jan 21, 2004
6,931
GB
I don't know if anyone has ever encountered this strange behaviour, it certainly sounds like like nonsense so am I missing something?

Here's the facts:
I am writing a query in ssms, reasonably complicated, with temp tables, linked servers and lots of lookup/transformation steps. When testing, I am trying to find some performance optimisations and have included the execution plan (Ctrl + M).
After running dbcc freeproccache and dropcleanbuffers, I run the query, it takes 1 sec. That's reasonable, so I Ctrl + M again and retry, after proccache/cleanbuffers.
The query then takes 15 secs to complete!
When buffered, it still runs in 1 sec though.

Have any of you experianced anything similar?
Can you think of any good explanations for this?
I've tried this several times, the results are the same.

--------------------
Procrastinate Now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top