shah_bs
21st June 2007, 20:30
This session was running extremely slow, even for a small range of Item Codes.

After some experimentation, I found that the following change improves performance by orders of magnitude (in my test sample, runtime went down from about 525 seconds to about 10 seconds, for the same selection parameters on the form.)
[NOTE: In our environment, we do not use Containerized Items nor do we ever intend to, so I was able to take this approach - ... ]

Original code:

and tdinv700.cmba refers to tiitm001 path tiitm100.item


Modified code:

and tiitm001._index1 = {tdinv700.item}


I was wondering if there is another way of doing this, without giving up the functionality of Containerized Items [just to keep within the 'BAAN standard functionality'].

mark_h
22nd June 2007, 04:02
I would tell the support exactly what you found. I would even show them you code changes. I have found at times the support center will work with you on performance issues, even listening to recommendations. I am going to have to look at those indexes tomorrow, but I thought tiitm001 only had an index on item.

shah_bs
22nd June 2007, 19:48
Mark, you are correct -tiitm001 has only item code as primary key. However, tiitm100 (cotainerized items) has item + container. I guess the 'path' business is not being converted into efficient select behind the scenes ...

mark_h
22nd June 2007, 22:05
I never really thought about tiitm001 having so many indexes. I think you are correct and the path statement is not being converted very efficiently. My question is - Would it be any quicker if you did do containerized items? I don't think so, but I am not sure. I would call support - I tried this session on our test systems(never did get a report), but it would take 5 minutes just to tell me "no data found".

shah_bs
22nd June 2007, 22:38
And if you modified the script as I have, you will get your 'no data found' in less than a second.

Unfortunately, I cannot play with containerized set up here. But I think you are right - it will still be slow.

Fortunately, we never intend to use containerized items, so the modification I have done is good for us - may not be good for everyone else ...