From: | Thomas Guettler <hv(at)tbz-pariv(dot)de> |
---|---|
To: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Recurring events |
Date: | 2011-06-06 10:59:44 |
Message-ID: | 4DECB320.30101@tbz-pariv.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
how do you store recurring events in a database?
Selecting all events in a week/month should be fast (comming from an index).
My solution looks like this:
Table event:
Columns: id, name, recurring, start_datetime, end_datetime
recurring is weekly, monthly, yearly or NULL.
end_datetime can be NULL (open end).
Can you create an indexed view with infinite rows? I only want to index
the last three year and the next three years.
An other solution would be to fill a table with "serialized" events. The recurring
events would be created and inserted into a table. This can only be done in a time frame
like above (last three year, next three years). If a recurring event gets altered,
all its serialized events need to be updated.
Any feedback?
Thomas Güttler
--
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de
From | Date | Subject | |
---|---|---|---|
Next Message | Condor | 2011-06-06 13:26:46 | Re: How to log query's from servers ? |
Previous Message | Craig Ringer | 2011-06-06 10:53:57 | Re: How to log query's from servers ? |