I am a developer and not a DBA. My customers are complaining about how slow my application is running. My application has about 3 queries that are very similar. They contain unions and case statements. When I run a particular query in management studio, sometimes it takes about 10 seconds. So, with three queries you can see that it takes a while in the application.
However, sometimes when I run the query in management studio, it comes back instantly or maybe takes a second or two. I know there are many factors involved in DB performance - lots of people hitting the DB at the same time, etc. I woud think that if there was a major problem with the query that it would always take a while to retrieve but that is not the case.
My question is if my queries actually do come back instantly, do I even spend any more time trying to tweak them or just write it off to a server, other issue and look elsewhere?