• Guys,

    By replacing the union query with a temporary table you can get a further performance enhancement, this implies that a Constant scan is slower than a Table scan.

    My results...

    Beginning test run...1 NOT IN

    Elapsed Time: 121543 ms

    Beginning test run...2 <>

    Elapsed Time: 132310 ms

    Beginning test run...3 LEFT OUTER JOIN

    Elapsed Time: 105760 ms

    Beginning test run...4 NOT EXISTS (UNION)

    Elapsed Time: 96250 ms

    Beginning test run...5 NOT EXISTS (temp table)

    Elapsed Time: 66633 ms

    ta.

     

    Nick