Last post Nov 23, 2016 02:58 AM by Chris Zhao
Nov 22, 2016 11:36 AM|Sanfoor|LINK
I have an SQL query that reads from one table,
when i write SELECT TOP 1000 FROM DBO.STUDENTS it returns 1000 records and its fine,
but when add where clause WHERE STUDENT_NO='2016986235' it goes to infinity?
how to trace this problem? iam using SQL server
Nov 22, 2016 11:42 AM|PatriceSc|LINK
Infinity that is ? Could it be rather than an error happens but this is ignored giving the impression that it never returns.
What if try :
SELECT * FROM DBO.STUDENTS WHERE STUDENT_NO='2016986235' in SQL Server Management Studio. Does it work fine ?
Ah or could it be that some rows are kept locked for a long period of time ? You never ever have an error message even if you wait a bit ?
Nov 23, 2016 01:30 AM|wmec|LINK
Selecting 1000 records WOULD not LEAD TO infinity. Try to select from other tables. If problem persists, then restart your server.
Nov 23, 2016 02:58 AM|Chris Zhao|LINK
The most immediate way of analyzing query performance is to use
SQL Profiler to show trace information interactively.
To identify a long-running query interactively