Performance effect of using TOP 1 in a SELECT query
问题 I have a User table where there are a Username and Application columns. Username may repeat but combination of Username + Application is unique, but I don't have the unique constraint set on the table (for performance) Question: will there be any difference (performance-wise) between : SELECT * FROM User where UserName='myuser' AND Application='myapp' AND - SELECT TOP 1 * FROM User where UserName='myuser' AND Application='myapp' As combination of Username + Application is unique, both queries