Re: Handling time series data with PostgreSQL

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Mark Johnson <remi9898(at)gmail(dot)com>
Cc: Jayaram <jairamcbe(at)gmail(dot)com>, Adalberto Caccia <adacaccia(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Handling time series data with PostgreSQL
Date: 2020-10-07 20:27:01
Message-ID: 20201007202701.GF3063@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greetings,

* Mark Johnson (remi9898(at)gmail(dot)com) wrote:
> I think the OP may be referring to Oracle's Temporal Validity feature.

Perhaps, but that's not the only way to manage time series data.

> [ ... ] In earlier releases of each DBMS we tried to accomplish
> the same by adding pairs of timestamp columns to each table and then
> writing our own code to handle row filtering. Partitioning isn't needed.
> Certainly partitioning by range could be used, but it would still require
> some manual efforts.

I've found that using the range data types can work quite will, with
overlaps queries, to manage time-series data instead of using pairs of
timestamp columns. With range data types you can also create exclusion
constraints to ensure that you don't end up introducing overlapping
ranges.

Either way require adjusting your queries though, no? And inserting and
maintaining the data..? I can appreciate wanting to be standards
compliant but this specific use-case doesn't really provide much
justification for using this particular feature. Perhaps there are
better ones.

Thanks,

Stephen

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message raf 2020-10-07 21:14:40 Re: Which is the setup with lowest resources you know Postgres is used in?
Previous Message Adrian Klaver 2020-10-07 19:43:23 Re: Missing libpq-dev version in buster-pgdg?