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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Intermittent problem with querying a table

Status
Not open for further replies.

aolb

Programmer
Apr 16, 2002
180
GB
We have a problem with one of our tables that has started to occur.

The table has about 4500 records and when it is queried select * from xxx it hangs. When we select count(*) from xxx it returns instantly.
When we stop and restart the SQL Service the problem stops only to return the next day.

Does anyone have any idea where the problem may lie?
 
Run profiler and see where this query hangs. Also there must be locks for that table. What happens if you change our query to:
Code:
select * from xxx WITH (NOLOCK)

Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
 
Thanks the advise. Currently the table is able to be queried because we had to stop and restart the service to get it going albeit temporary. Will try nolock when this happens again but suspect might be something to do with transactions.

Cannot review code as it is compiles source from a supplier.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top