Re: best db schema for time series data?

From: Jayadevan M <Jayadevan(dot)Maymala(at)ibsplc(dot)com>
To: pgsql-performance(at)postgresql(dot)org, pgsql-performance-owner(at)postgresql(dot)org
Subject: Re: best db schema for time series data?
Date: 2010-11-16 11:55:42
Message-ID: OFF91C954D.F28B7EB2-ON652577DD.0040D2C6-652577DD.00418650@ibsplc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi,
> > If you mostly need the last few prices, I'd definitaly go with the
> > first aproach, its much cleaner. Besides, you can store a date/time
> > per price, so you know when it changed.
We too were using such an approach for 'soft deletes'. Soon we realized
that using a one char valid flag to mark the latest records was better. It
was easier to filter on that. An index on the modified date column was
not being used consistently for some reason or the other.
The VALID records form a small portion of the big table and an index on
the column help fetch the data pretty fast. Of course, you could partition
on the flag also (we did not have to). A slight processing overhead of
updating the valid FLAG column is the penalty. This was an Oracle
database.
Regards,
Jayadevan

DISCLAIMER:

"The information in this e-mail and any attachment is intended only for
the person to whom it is addressed and may contain confidential and/or
privileged material. If you have received this e-mail in error, kindly
contact the sender and destroy all copies of the original communication.
IBS makes no warranty, express or implied, nor guarantees the accuracy,
adequacy or completeness of the information contained in this email or any
attachment and is not liable for any errors, defects, omissions, viruses
or for resultant loss or damage, if any, direct or indirect."

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Alvaro Herrera 2010-11-16 15:26:44 Re: autovacuum blocks the operations of other manual vacuum
Previous Message Louis-David Mitterrand 2010-11-16 11:28:16 Re: best db schema for time series data?