Grant <suppressed> wrote: > I have a job that allocates available inventory to orders based on a > bunch of different factors. It takes about 20 minutes to run and it's > run every hour. The problem is, if certain values change during the > job's execution, it will be thrown off. > > I thought of setting up a cache of certain values before the job is > run and comparing them when the job is complete so the job can be > re-run if anything has changed. Alternatively, is there anything > built into mysql that I could use to straighten this out? > Perhaps you could set up a couple of staging tables. Copy working data into the staging table(s) and run your job against those. I'm sure you don't want to lock the tables for 20 minutes at a time, every hour. On the other hand, wouldn't it be better to allocate inventory to orders as soon as the orders are placed, and/or as soon as new stock comes in, rather than running a job every hour. It sounds a lot less error-prone to me. -- _/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/ _/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h _/ _/ _/ _/ _/ _/ _/ _/_/ suppressed _/ _/ _/_/_/_/ _/ _/_/_/ _/ _/ _______________________________________________ interchange-users mailing list suppressed http://www.icdevgroup.org/mailman/listinfo/interchange-users
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.