You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, I am aware of this alternative way of calculating and (exact) relational division (#1205). jOOQ currently only implements relational division with remainder, which can only be expressed with doubly nested NOT EXISTS predicates, I think.
I'm curious about the publication date of the paper you referenced. They claim to "be proposing" this alternative way, even if it is cited quite often in literature and blogs, e.g. in both links I've added to the issue. In fact, their proposal is not entirely correct in (non-relational) corner cases, where the dividend or the divisor contains duplicates. A more correct variant would involve using COUNT(DISTINCT B)
Also, I'd be curious about a realistic benchmark backing the claim that using HAVING and COUNT(*) is actually faster.
Clearly, the readability of the produced SQL using HAVING and COUNT() is much better, though!
Some background facts:
Some SQL examples:
The text was updated successfully, but these errors were encountered: