It looks like the inventory availability is all calculated in this stored procedure, spimIMSQtyAvailable.

This stored procedure has multiple loops and is very inefficient with the code it uses. It is a big bottleneck and routinely slows the response time of our shipping and order entry activities.

It needs updated (it was written 20 years ago and remains unchanged) to use modern methods to improve performance.

We see millions of records being read in the database to update less than 100 records routinely. This needs fixed.

Comments

  • Contact a dba, seriously. The code may be old but there are a lot of very high-volume sites that work fine with fairly minor tuning.