Is there a performance difference between these two queries. Apparently WHERE should be reserved for querying values on the table to be SQL 92 compliant, is there a performance reason?
SELECT
Foo.FooId
(
SELECT
Bar.BarId
FROM
Bar
WHERE
Bar.FooId = Foo.FooId
FOR XML PATH('Bar'), TYPE
) As 'Bar'
FROM
Foo
FOR XML PATH('Foo'), TYPE
and
SELECT
Foo.FooId
(
SELECT
Bar.BarId
FROM
Bar
JOIN
Foo
ON
Foo.FooId = Bar.FooId
FOR XML PATH('Bar'), TYPE
) As 'Bar'
FROM
Foo
FOR XML PATH('Foo'), TYPE
Along the same lines, is there a performance difference between these two queries?
SELECT
Foo.FooId
FROM
Foo
WHERE
Foo.FooId IN
(
SELECT
Bar.FooId
FROM
Bar
WHERE
Bar.SomeField = 'SomeValue'
)
And
SELECT
Foo.FooId
FROM
Foo
JOIN
Bar
ON
Bar.FooId = Bar.BarId
WHERE
Bar.SomeField = 'SomeValue'