<br> Same answer: most of the time, it is better to have it as a fact, but sometimes, a from may be better by limiting your search space.<br><br> Again, these things are like SQL. You need to look at the whole domain model as well as the set of your rules. The major performance optimizations are made on a rule-set level, not individual rules. So, if you want the best performance you need to write your individual rules to work better as a set of rules, sharing nodes, reducing partial matches, etc.<br>
<br> []s<br> Edson<br><br><div class="gmail_quote">2008/11/21 vdelbart <span dir="ltr"><<a href="mailto:delbart.0466@apside.net">delbart.0466@apside.net</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
I have a similar question with global or fact (Foo is never modified)<br>
<br>
What's more efficient beetwen :<br>
<br>
1. rule "Foo_globals"<br>
when<br>
Foo(name != null) from fooGlobals<br>
then<br>
...<br>
end<br>
<br>
2. rule "Foo_facts"<br>
when<br>
Foo(name != null)<br>
then<br>
...<br>
end<br>
<br>
thanks,<br>
<br>
<br>
regards,<br>
<br>
V.<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://www.nabble.com/What%27s-more-efficient-too---tp20623413p20623413.html" target="_blank">http://www.nabble.com/What%27s-more-efficient-too---tp20623413p20623413.html</a><br>
Sent from the drools - user mailing list archive at Nabble.com.<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>
</font></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>