SELECT TOP 1 *
FROM URLForPosting WITH(nolock)
WHERE status = 0
ORDER BY newid()
This is a request when I run the code, I get a timeout, even when I run it on SQL Server, I get a timeout.
However, when I do this
SELECT TOP 1 *
FROM URLForPosting WITH(nolock)
WHERE status = 0
It works great.
Also, the first query worked fine until there were records in the records for the first 6 that did not have a total of 8, now it gives time? I created an index by status.
Any suggestions?
source
share