On 6/29/07, Samuel R. Neff <[EMAIL PROTECTED]> wrote:


You can do it with a JOIN instead of IN and I'm pretty sure it will still
use an index.


SELECT
        COUNT(*)
FROM
        guid_version_map M
                        LEFT JOIN
        latest_version V
                        ON
                M.guid = V.guid AND M.version = V.version
WHERE
        V.guid IS NULL;


HTH,

Sam


Thanks!  This one, and the other solution that involved the correlated
sub-query, will likely do exactly what I want.  (I'm currently waiting on my
production-sized database to copy down from the machine that's hosting it to
execute the code on customer-level hardware to measure the performance of
each query.)

I need to teach myself all of these left-right-inner-outer join syntaxes, as
they are more flexible and easier to remember than the oracle-specific
extensions involving (+) on the left/right inside or outside of equality
where sub-clauses. :)



--andy

Reply via email to