[rules-users] Poor performance from a simple join
Wolfgang Laun
wolfgang.laun at gmail.com
Mon Dec 19 11:35:55 EST 2011
How is the ration of different device_type values to BINNING_INPUT facts?
-W
On 19/12/2011, David Martin <david.martin at mercedsystems.com> wrote:
> Folks:
>
> My co-workers and I have been using Drools to great success, but we ran
> smack into a performance brick wall recently.
>
> 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.)
>
> LU_DEVICE_TYPE models a lookup table.
>
> rule "Binning for Attribute: Device_type_desc"
> when
> $call :
> BINNING_INPUT()
> $device_typeLookup :
> LU_DEVICE_TYPE(
> $call.device_type == device_type
> )
>
> then
> $call.setDevice_type_desc($device_typeLookup.getDevice_type_desc());
> end
>
> It's a simple enough rule: join on the device_type field. Unfortunately,
> this rule and a few others like it are taking FOREVER to insert. Even when
> I cut the number of BINNING_INPUT facts in working memory down from 8M to
> 10k.
>
> This feels like a basic Drools question. But I can't seem to find any help
> from google.
>
> Please advise!
>
> Thanks in advance,
>
> Dave Martin
>
>
More information about the rules-users
mailing list