I'm wondering if there's a slower running time between IN and EQUAL in the
WHERE clause.
SELECT * FROM CUSTOMERS WHERE CUST_ID = 123;
vs
SELECT * FROM CUSTOMERS WHERE CUST_ID IN (123);
TIA.
XMan wrote:
> I'm wondering if there's a slower running time between IN and EQUAL
> in the WHERE clause.
> SELECT * FROM CUSTOMERS WHERE CUST_ID = 123;
> vs
> SELECT * FROM CUSTOMERS WHERE CUST_ID IN (123);
> TIA.
The easiest way to figure this out for your situation is to examine the
execution plans for each. Generally speaking, SQL Server will use the
same execution plan for each.
David Gugick
Quest Software
www.imceda.com
www.quest.com
|||Thanks. Just like to hear any different opinions out there on this subject.
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:O0D8imDcFHA.3620@.TK2MSFTNGP09.phx.gbl...
> XMan wrote:
> The easiest way to figure this out for your situation is to examine the
> execution plans for each. Generally speaking, SQL Server will use the
> same execution plan for each.
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment