Good day everyone..
I have the following design.
BO: Location
BO: Item
BO: Colour
BO: ItemColour
BO: LocationProduct (control the balance quantity for each Item, Item Colour and Location)
In the LocationProduct, the attribute are:
- ID
- MyItemID
- MyColourID
- MyLocationID
- MyItemColourID
In the BO ItemColour, the attribute are:
Entry Form: Item, after created, it will show the Tab for ItemColour, Add New to select one or more colour for this Item.
After select the Item Colour and save, I have a rule on the ItemColour to create the LocationProduct.
Find All Location
Create LocationProduct FOR EACH Location WITH
LocationProduct.MyItemID=ThisItemColour.MyItemID,
LocationProduct.MyColourID=ThisItemColour.MyColourID,
LocationProduct.MyItemColourID=ThisItemColour,
LocationProduct.MyLocationID=Location
The Colour selected might only 1 to 10, there is no problem for the above process..
When the user user create a New Location, in the Location BO, I have a rule to create the LocationProduct:
Find All ItemColour
Create LocationProduct FOR EACH ItemColour WITH
LocationProduct.MyItemID=ItemColour.MyItemID,
LocationProduct.MyColourID=ItemColour.MyColourID,
LocationProduct.MyItemColourID=ItemColour.ID,
LocationProduct.MyLocationID=ThisLocation
In this process, it will get all the ItemColour and generate the above rule.
The problem is here: User have created many ItemColour for each of the Item... more than 1000 records.... can be 2000 records...
When user create a new location and save.. the screen showed "Sending data...." and take some time to process.. My client asking me why so slow? (He went out to wash room and come back... the process still not yet finish...)
I have transfered the code as the Process, so In the Location BO...
Location.ID IS DEFINED
CREATE_LOCATIONPRODUCT
The performance did not changed. The process finished first before show a new entry form of Location... How to improve the process?
How to run the process faster behind after the user have created the New Location without interface the user to do other job?
In the VB.Net Programming... there is a function called "After Update".. so this programming code will run behind the screen and automatically insert and update the database.
Should I use upgrade the database to SQL to perform such job in order to overcome the performance...
Welcome all friends for discussion...thank you...