in reply to Schedule Optimization

If you implement the behavior in SQL, you may be able to use Test::DatabaseRow to run tests in a perl test suite.

Here's an overview of testing modules

I too think sample data would help me better understand your interesting question.