Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Slow running query - single user

Author  Topic 

SQLRabbit
Starting Member

1 Post

Posted - 2010-03-20 : 16:54:00
Hi there, 1st post - go easy ;)

I was asked this in an interview for a SQL developer role recently and its been bugging me. The question was your run of the mill: "A user is complaining that a query that normally completes instantly is not responding, what actions do you take?"

I've been asked this a thousand times so I started confidently reeling off the usual suspects: blocking, missing indexes, out-of-date stats, hardware bottlenecks, etc. After a while I was running out of ideas and my interviewer was still saying: "nice try, but not the answer I'm looking for".

Now I know this is a very open ended question, but after a few awkward silences and a lot of ums and ahs she gave me a hint, which should have helped narrow things down but only left me scratching my head. She said:

"So there's no blocking, hardware bottlenecks or connectivity/permissions problems. You can see the user's query in sysprocesses, its running but isnt returning a result. You run the same query yourself in SSMS and it completes instantly..."

Its the last bit I don't get - why would it work for me but hang for the user?

Sorry to report that I threw my hat in in the end. But I'd still love to know the answer. Any ideas would be most appreciated.

Thanks

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-03-20 : 17:42:25
I don't think the interviewer had a valid answer either. Once you rule out blocking, hardware, connectivity, configuration and permissions issues. If it works for you it will work for the other user.

If she's looking for recompile or something, she's off the mark.

Once you can see it in sysprocesses, it's going to work if there aren't hardware or blocking issues.
Go to Top of Page

DBA in the making
Aged Yak Warrior

638 Posts

Posted - 2010-03-20 : 18:03:57
Maybe the question wasn't designed to test your SQL Server knowledge. Maybe it was some sort of psych test. I'd ring her back and ask her for the answer she was looking for.

There are 10 types of people in the world, those that understand binary, and those that don't.
Go to Top of Page
   

- Advertisement -