Interview Question in Sql Server 2000


 

Interview Question :: How to solve randomly connection time out problem

plz help me to slove connection time out problem.
i am executing query from sql sever 2000 itself
e.g. "select * from tablename".
its taking too much time and continuously remains in execution mode and
then gives time out error.
but when same query execute again its giving me result in 0 second.

what could be the reason. why sql server not giving response some time.
i m excuting query from sql server studio so there is no matter of sql connection.
pls help me out...............
by ksk