Hi Laun<div><br></div><div>Tnks for dis wonderfl solution ...I guess our performance issue is solved as of now..But I got a small query over it. </div><div><br></div><div>1) When 10k records were there in the DT, the DT was to compile and all these 10k rules now stays in the production memory.And we were inserting a single fact in working memory.</div>
<div>2) But in the approach suggested by you , we got the single rule in the production memory but now we have 10k facts to be in working memory.But we get a performance enhancement.</div><div><br></div><div>Does it means the size and  speed of working memory is more than to production memory? Else what is the reason of this performance enhancement?</div>
<div><br></div><div>Regards<br><br><div class="gmail_quote">On Tue, Jun 19, 2012 at 4:24 PM, Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 19/06/2012, zeeshan &lt;<a href="mailto:zeeshan.spring@gmail.com">zeeshan.spring@gmail.com</a>&gt; wrote:<br>

&gt; Hi Laune,<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Thanks very much for your response.  We would like to try and implement<br>
&gt; Option 3.<br>
&gt;<br>
&gt; We assume that the implementation involves setting up individual rows in<br>
&gt; the<br>
&gt; excel as a collection of objects and using the From keyword to look up the<br>
&gt; output value/row we want based on the input parameter values.<br>
<br>
</div>Huh? You leave the Excel data as it is except for throwing away the<br>
header lines.<br>
<div class="im"><br>
&gt;  Is it<br>
&gt; possible for you to share the relevant code you have created to implement<br>
&gt; this option?<br>
<br>
</div>This is the rule:<br>
<br>
rule calculatePremium<br>
when<br>
$pfc: PremiumCalculatorFactBean( $age: age,<br>
                          $policyTerm: policyTerm,<br>
                          $interestRate: interestRate,<br>
                          $gender: gender,<br>
                          $smokingStatus: smokingStatus,<br>
                          $channel: channel,<br>
                          premiumRate == 0.0 )<br>
$p: Premium( age == $age,<br>
        policyTerm == $policyTerm,<br>
        interestRate == $interestRate,<br>
        gender == $gender,<br>
        smokingStatus == $smokingStatus,<br>
        channel == $channel )<br>
then<br>
   modify( $pfc ){ setPremiumRate( $p.getPremiumRate() ) }<br>
end<br>
<br>
<br>
And a few lines of Java code:<br>
<br>
    private void makeRates( String csvPath ) throws Exception {<br>
        File f = new File( csvPath );<br>
        InputStream is = new FileInputStream( f );<br>
        Reader rdr = new InputStreamReader( is );<br>
        LineNumberReader lnrdr = new LineNumberReader( rdr );<br>
<br>
        String line;<br>
        while( (line = lnrdr.readLine()) != null ){<br>
            if( line.charAt(0) == &#39;&quot;&#39; ) continue;<br>
            String[] tokens = line.split( &quot;;&quot; );<br>
            if( tokens.length != 7 ) continue;<br>
            int age = Integer.parseInt( tokens[0] );<br>
            int policyTerm  = Integer.parseInt( tokens[1] );<br>
            int interestRate = Integer.parseInt( tokens[2] );<br>
            String gender = tokens[3].substring( 1, 2 );<br>
            String smokingStatus = tokens[4].substring( 1, 2 );<br>
            int channel = Integer.parseInt( tokens[5] );<br>
            double premiumRate = Double.parseDouble( tokens[6] );<br>
<br>
            Premium p = new Premium( age, policyTerm, interestRate,<br>
gender, smokingStatus, channel, premiumRate );<br>
            kSession.insert( p );<br>
        }<br>
        close( rdr );<br>
    }<br>
<span class="HOEnZb"><font color="#888888"><br>
-W<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
&gt;<br>
&gt; Thanks !<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; View this message in context:<br>
&gt; <a href="http://drools.46999.n3.nabble.com/Hibernate-Configuration-with-Drools-5-4-tp4017981p4018051.html" target="_blank">http://drools.46999.n3.nabble.com/Hibernate-Configuration-with-Drools-5-4-tp4017981p4018051.html</a><br>

&gt; Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;<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>
</div></div></blockquote></div><br></div>