<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>Oops... This e-mail went out too quickly.</div>
<div><br>
</div>
<div>There are 8M BINNING_INPUT facts that will eventually be reasoned upon... But only 10k at a time.</div>
<div><br>
</div>
<div>In other words, the matrix of BINNING_INPUT x LU_DEVICE_TYPE should be about 10k x 10k&nbsp;</div>
<div><br>
</div>
<div>Dave</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>David Martin &lt;<a href="mailto:david.martin@mercedsystems.com">david.martin@mercedsystems.com</a>&gt;<br>
<span style="font-weight:bold">Reply-To: </span>Rules Users List &lt;<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>&gt;<br>
<span style="font-weight:bold">Date: </span>Mon, 19 Dec 2011 16:23:21 &#43;0000<br>
<span style="font-weight:bold">To: </span>&quot;<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>&quot; &lt;<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>&gt;<br>
<span style="font-weight:bold">Subject: </span>[rules-users] Poor performance from a simple join<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div><span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px; ">Folks:</span></div>
<span id="OLK_SRC_BODY_SECTION">
<div dir="ltr">
<div ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;"><br>
My co-workers and I have been using Drools to great success, but we ran smack into a performance brick wall recently.<br>
<br>
In the example below, both BINNING_INPUT and LU_DEVICE_TYPE have large numbers of associated facts in working memory (BINNING_INPUT has more than 8 million facts in working memory, LU_DEVICE_TYPE about 10k.)
</div>
</div>
</div>
</span>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div dir="ltr">
<div ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">LU_DEVICE_TYPE models a lookup table.<br>
<br>
<span style="font-family: 'Courier New'; ">rule &quot;Binning for Attribute: Device_type_desc&quot;</span><br style="font-family: Courier New;">
<span style="font-family: 'Courier New'; ">&nbsp; when</span><br style="font-family: Courier New;">
<span style="font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp; $call :</span><br style="font-family: Courier New;">
<span style="font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">
BINNING_INPUT</span>()</span><br style="font-family: Courier New;">
<span style="font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp; $device_typeLookup :</span><br style="font-family: Courier New;">
<span style="font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">
LU_DEVICE_TYPE</span>(</span><br style="font-family: Courier New;">
<span style="font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $call.device_type == device_type</span><br style="font-family: Courier New;">
<span style="font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )</span><br style="font-family: Courier New;">
<br style="font-family: Courier New;">
<span style="font-family: 'Courier New'; ">&nbsp; then</span><br style="font-family: Courier New;">
<span style="font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp; $call.setDevice_type_desc($device_typeLookup.getDevice_type_desc());</span><br style="font-family: Courier New;">
<span style="font-family: 'Courier New'; ">end</span><br>
<br>
It's a simple enough rule: join on the device_type field.&nbsp; Unfortunately, this rule and a few others like it are taking FOREVER to insert. &nbsp;Even when I cut the number of BINNING_INPUT facts in working memory down from 8M to 10k.<br>
<br>
This feels like a basic Drools question.&nbsp; But I can't seem to find any help from google.<br>
<br>
Please advise!<br>
<br>
Thanks in advance,<br>
<br>
Dave Martin<br>
<br>
</div>
</div>
</div>
</span></div>
</div>
_______________________________________________ rules-users mailing list <a href="mailto:rules-users@lists.jboss.org">
rules-users@lists.jboss.org</a> <a href="https://lists.jboss.org/mailman/listinfo/rules-users">
https://lists.jboss.org/mailman/listinfo/rules-users</a> </span>
</body>
</html>