|
Posted by Erland Sommarskog on 09/21/06 22:35
yicong (cici-lool@163.com) writes:
> could you tell me which case is more efficiency?(my tables have no index)
> And does it has any else case more efficiency?
Why not benchmark instead? Without access to the data, it's difficult
to say what is going to happen.
Anyway, without indexes nothing will be effecient.
Furthermore you should not interpolate parameter values into the string
but use parameterised commands instead, not the least if you are interested
in performance.
I'm sorry, but I gave trying to understand your first query when I came
to this "subquery" that I don't know what it is.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|