Skip to content
Advertisement

Executing stored procedure takes too long

I am trying to update quantity on hand for all the inventory items that I have whenever I make a purchase or a sale. I have a stored procedure that does the job. It runs along fine, but when I have for example 2000 inventory items, execution of the query takes more than 45 minutes – any ideas?

Advertisement

Answer

I fiqured out why my query was slow i had a column that stores the last update date & time of each row.and i was updating that column by using a trigger and that affected performance dramatically.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement