db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendleton.de...@gmail.com>
Subject Re: Query execution never ends
Date Fri, 19 Mar 2010 13:55:57 GMT
> SELECT count(*)
> FROM contract co
> LEFT JOIN ContractSubject insured ON insured.contract_id=co.id AND
> insured.id=co.insured_id

In this query, how does the result (the returned count) change when you
change LEFT JOIN to JOIN?

It sounds like you have a large number of contract records which have
no ContractSubject record which matches, and the difference between
the two joins is that in the outer join, those contract records are preserved.



View raw message