Var Set generates a select count(*) / .subset() as temp fix

A configuration tool allowing highly abstracted configuration of Maximo to support business rules.

Var Set generates a select count(*) / .subset() as temp fix

Postby Will.Hampton » Fri Nov 06, 2009 8:32 am

So here you go;

In assessing the statement “var set = maximo.<objectname>;” it was determined that each (and every) time it was called, it performed a “select count(*) on objectname”,

Due to the way Maximo is configured in our instance that happened on every record being loaded (MDL) to the MatUseTrans table, which as you can imagine is a lot of records…

Each query on a smallish table didn’t take all that much time, but on another system with 2+million records it was taking upwards of 4-5 seconds to complete the count, not including the remainder of the transaction(s).

As a temporary workaround we did a .subset(“1=2”) in the query – this still appears to do a quick “full” index scan but takes only .078 seconds to return a result…

So far I’ve not found anywhere that this impacts the system (the application screen count is still correct – go figure…) and we haven’t been able to determine yet why it’s doing that. Any thoughts?

So the question is do you know of a way to tell TRM/Maximo to not perform the count when initializing the object? Any thoughts on this? Looking for some best practice ideas :D

Re:

replaced:
var set = MAXIMO.objectname;

with:
var set = MAXIMO.objectname.subset("1=2");
Will.Hampton
 
Posts: 28
Joined: Fri Sep 11, 2009 11:41 am

Return to TRM Rules Manager

Who is online

Users browsing this forum: No registered users and 1 guest

cron