From: Pat M <pmeloy@removethispart.home.com>
To: pgsql-sql@postgresql.org
Subject: Cenceptual help needed - periodic events
Date: Sat, 13 Oct 2001 05:55:14 -0700
Message-ID: <9q9dq9$pnp$1@news.tht.net> (raw)
I'm goofing around, designing a planned maintenance system. In a couple of
weeks I'll be taking on the actual scheduling of tasks. How would you
experts out there approach this? I've beeen thinking I can approach this two
ways.
1) When a list of tasks is requested, generate new rows and store them.
2) When a list of tasks is requested, look at the task row and calculate the
tasks, display them, but do not generate rows for storage. Just calc on the
fly all the time.
Method #1 would mean less CPU and RAM use but then I'd have to worry about
tasks changing or being added to a maintenance schedule and not being
reflected in any pre-generated rows. #2 would alleviate that problem, but
may be slower overall and perhaps eat large amounts of ram.
If anyone has done something similar with periodic events, what did you find
worked best?
I'm planning on using a base task record to record the frequency and other
specifics of a task. This record is the basis for generating the periodic
tasks.
One row:
task_id =1 (serial)
task_system = 1
task_equip = 12
task_text = Lubricate fan shafts with lithium grease
task_interval = 1 month (using an interval type column)
task_startmonth = 2 (offset so that not ALL 6 month interval tasks actuall
happen in June)
Another row:
task_id =25 (serial)
task_system = 8
task_equip = 72
task_text =
task_interval = 6 month (using an interval type column)
task_startmonth=3
Then I'll have to step through the calendar by month and match up all the
task rows and print out a single page for each system.
This is all a brand new concept to me, so any suggestions are more than
welcome. I still have a few weeks work in other areas to keep me busy, but
this is the toughy that I'm spending brain time on =)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: pmeloy@removethispart.home.com
Subject: Re: Cenceptual help needed - periodic events
In-Reply-To: <9q9dq9$pnp$1@news.tht.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox