Re: How to deal with almost recurring data?

From: matthias(at)cmklein(dot)de
To: dev(at)archonet(dot)com (Richard Huxton)
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to deal with almost recurring data?
Date: 2004-11-16 17:34:08
Message-ID: E1CU7DU-0007Y5-00@www.strato-webmail.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks for the answer.
If I go that way, though, I am afraid I will have very long query times.
And I have no idea how to handle large databases of that kind without
losing performance.

If I store the pattern - is there a way to still perform the query in the
database? Or do I have to do that in my software? (Matching the resultset
to the pattern)

Thanks

Matt

--- Ursprüngliche Nachricht ---
Datum: 16.11.2004 16:42
Von: Richard Huxton <dev(at)archonet(dot)com>
An: matthias(at)cmklein(dot)de
Betreff: Re: [GENERAL] How to deal with almost recurring data?

> matthias(at)cmklein(dot)de wrote:
> > I am creating a database which is supposed to contain many data
entries
> > (events) that differ only in the date they occur.
> >
> > So let's say event 1 occurs every Monday, Tuesday and Sunday between
> > January 1st and May 30th 2005.
> >
> > How do I store and manage such data in a meaningful way?
> >
> > The simple idea would be to store the event itself in one table and
have
> > another table containing all the dates (all Mondays, Tuesdays and
Sundays
> > between 2005-01-01 and 2005-05-30) plus a foreign key to event_ID =>

> > (date, event_id).
> >
> > The problem is that we are dealing with several tenthousand events,
> > resulting in several million single dates if I stored it in the
described
> > manner.
>
> This seems like a reasonable approach. Don't forget that PostgreSQL is
> designed to store large amounts of data.
>
> Of course, if there is some pattern to the dates then you might be
> better off storing the pattern rather than the individual dates.
>
> --
> Richard Huxton
> Archonet Ltd
>
> ---------------------------(end of
broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

Browse pgsql-general by date

  From Date Subject
Next Message matthias 2004-11-16 17:38:08 Re: How to deal with almost recurring data?
Previous Message Richard_D_Levine 2004-11-16 17:02:25 Re: 24x7x365 high-volume ops ideas