• anthony.green (12/19/2012)


    Sample data would be good as well

    Using the following sample data

    insert into Indexing values (199),(200),(210),(220),(230),(240),(250),(251)

    insert into Indexing2 (Col4) values (199),(200),(210),(220),(230),(240),(250),(251)

    I get no duplicates and now stream aggregate, the only difference is a left semi join on the exists vs a inner join.

    Also post your execution plans in a SQLPLAN format so we can take a look.

    When I say duplicate, I mean that for Col4 there is more that one row with the same value. The inner join query is returning all those rows while the correlated query doesn't.