In general, Rete algorithm sacrifices memory for performance, by storing all partial matches pre-computed. It also creates all those partial matches eagerly. So, if you have a rule with an "unrestricted match" on two patterns, it effectively creates a Cartesian Product of those two facts in memory, even if these facts are later filtered down by joining to another fact.