<br>&nbsp;&nbsp; Most of the time, Join will be better, specially if it is an == join or if you have many rules doing the same thing, because you get node sharing between them.<br><br>&nbsp;&nbsp; If it is a one rule thing, or if the domain is large, but you need only part of the information, you may be better loading the information into the rule on-demand, using from.<br>
<br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><br><div class="gmail_quote">2008/11/21 David Sinclair <span dir="ltr">&lt;<a href="mailto:dsinclair@chariotsolutions.com">dsinclair@chariotsolutions.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I have a question regarding the performance of pattern matching. Is it more performant to use join nodes, or to use a from?<br><br>For example. With joins I could write a rule like<br><br>rule &quot;Foo Join&quot;<br>&nbsp;&nbsp;&nbsp; when<br>

&nbsp; &nbsp; &nbsp; &nbsp; Foo($bar : bar != null)<br>&nbsp; &nbsp; &nbsp; &nbsp; Bar(this == $bar)<br>&nbsp; &nbsp; then<br>&nbsp; &nbsp; &nbsp; &nbsp; ... &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>end<br><br>rule &quot;Foo From&quot;<br>&nbsp;&nbsp;&nbsp; when<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $foo :Foo()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Bar () from $foo.bar<br>&nbsp;&nbsp;&nbsp; then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<br>

end<br><br>thanks<br>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br> &nbsp;Edson Tirelli<br> &nbsp;JBoss Drools Core Development<br> &nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>