Live data from Hacker News

Building a distributed time-series database on PostgreSQL

blog.timescale.com

61–70 of 98 posts

Re: Building a distributed time-series database on PostgreSQL

#61
post #58

> Building a distributed time-series database on PostgreSQL Next order of business: Making mud pies. PostgreSQL is geared towards transactional work. With time series, you basically just append data occasionally, and do analytics. PostgreSQL is terrible for analytics - its architecture is all wrong. 2 or 3 orders of magnitude slower than the state of the art if not more.

Which databases are good for analytics from your point of view? In my experience, being able to do advanced ad-hoc SQL queries is priceless for analytics. Timescale helps in scaling time series use-cases that used to scale badly in plain PostgreSQL.

There are other relational databases like MemSQL or Clickhouse that use distributed column-oriented architectures that are much better at large scale analytics and aggregations.

Postgres is getting pluggable storage engines in the next version (and already has foreign data wrappers) so that can at least lead to a better storage design.

Re: Building a distributed time-series database on PostgreSQL

#62
post #11

Earlier quoted context omitted.

[Timescaledb engineer here] We like to say that time-series data is any data that is insert-mostly with data associated with the most recent time period. That's a pretty broad definition, intentionally so. We see usage in telecoms, heavy industry, science, health, IoT, etc. It's really about recording the history of your data as it evolves, instead of just the current state.

How does it compare with using temporal tables in a relational database?

Temporal table = state of the data in the table at a particular time. Very useful for auditing or seeing how data has changed between different periods.

Timeseries = data with a primary key that includes time, potentially with other time properties. For example, metrics are commonly associated with a value at some time.

Re: Building a distributed time-series database on PostgreSQL

#63

> Building a distributed time-series database on PostgreSQL Next order of business: Making mud pies. PostgreSQL is geared towards transactional work. With time series, you basically just append data occasionally, and do analytics. PostgreSQL is terrible for analytics - its architecture is all wrong. 2 or 3 orders of magnitude slower than the state of the art if not more.

If you take a look at any of our benchmarks, you’ll see that this is not the case. PostgreSQL in fact can scale quite well for time-series analytics, if architected correctly. But why don’t you just try out TimescaleDB and see for yourself?

Please link to those benchmarks, and we'll see. Also, a link to the relevant SIGMOD/VLDB/ICDE/DaMoN/ADMS/etc. submission arguing in favor of TimeScaleDB's design would also be appreciated.

On the linked-to article I only see references to irrelevant transactional DBMSes...

Re: Building a distributed time-series database on PostgreSQL

#64
post #58

> Building a distributed time-series database on PostgreSQL Next order of business: Making mud pies. PostgreSQL is geared towards transactional work. With time series, you basically just append data occasionally, and do analytics. PostgreSQL is terrible for analytics - its architecture is all wrong. 2 or 3 orders of magnitude slower than the state of the art if not more.

Which databases are good for analytics from your point of view? In my experience, being able to do advanced ad-hoc SQL queries is priceless for analytics. Timescale helps in scaling time series use-cases that used to scale badly in plain PostgreSQL.

It's not just my point of view - it's well known in the research community, and has been for decades.

For FOSS, have a look at MonetDB. For research-oriented systems, look for publications regarding HyperDB or VectorWise/Actian Vector (VectorH in the cluster version). Other commercial offerings are Vertica (formerly C-Store) and SAP Hana.

PostgreSQL is not even something anyone compares against in analytics...

Re: Building a distributed time-series database on PostgreSQL

#65
post #59

Still waiting for AWS RDS for PostgresSQL to support the TimescaleDB extension, 2 years and counting: https://github.com/timescale/timescaledb/issues/65

Probably not gonna happen as AWS wants to sell its own solution.

When though? AWS Timestream was discussed on HN 8 months ago[1]. I had registered for the preview and still no access or even a response from AWS.

[1] https://news.ycombinator.com/item?id=18553336

Re: Building a distributed time-series database on PostgreSQL

#66

Earlier quoted context omitted.

If you take a look at any of our benchmarks, you’ll see that this is not the case. PostgreSQL in fact can scale quite well for time-series analytics, if architected correctly. But why don’t you just try out TimescaleDB and see for yourself?

Please link to those benchmarks, and we'll see. Also, a link to the relevant SIGMOD/VLDB/ICDE/DaMoN/ADMS/etc. submission arguing in favor of TimeScaleDB's design would also be appreciated. On the linked-to article I only see references to irrelevant transactional DBMSes...

Open-source Time-Series Benchmarking Suite: https://github.com/timescale/tsbs

InfluxDB: https://blog.timescale.com/blog/what-is-high-cardinality-how... https://blog.timescale.com/blog/timescaledb-vs-influxdb-for-...

Cassandra: https://blog.timescale.com/blog/time-series-data-cassandra-v...

MongoDB: https://blog.timescale.com/blog/how-to-store-time-series-dat...

Re: Building a distributed time-series database on PostgreSQL

#67
post #22

The biggest limit is that their "chunking" of data by time-slices may lead directly to the hot partition problem -- in their case, a "hot chunk." Most time series is 'dull time' -- uninteresting time samples of normal stuff. Then, out of nowhere, some 'interesting' stuff happens. It'll all be in that one chunk,which will get hammered during reads. Like, imagine all the telemetry data and video that was taken during a…

Hi Peter, as the blog post talks about, our distributed hypertables typically partition by both time _and_ "space" (i.e., some other column like device id, etc.) as a way to better parallelize I/O (reads & writes) for the "current" time. That is, each time slice is typically spread across all nodes that existed when the time interval was opened. So this greatly ameliorates the interesting "time" problem you mention.…

I was disappointed to see that Adaptive Chunking is deprecated[1]. Are there future plans to ~replace this functionality?

[1] https://docs.timescale.com/latest/api#set_adaptive_chunking

Re: Building a distributed time-series database on PostgreSQL

#68
Anyone have examples of using this for financial / trading algorithm based needs? I've been investigating solutions for a while now and haven't had much luck on a winner.

Is it better to do aggregations with the DB or through some MapReduce method (Google Dataflow?) and write that to a DB?

Re: Building a distributed time-series database on PostgreSQL

#69
post #67
post #22

Earlier quoted context omitted.

Hi Peter, as the blog post talks about, our distributed hypertables typically partition by both time _and_ "space" (i.e., some other column like device id, etc.) as a way to better parallelize I/O (reads & writes) for the "current" time. That is, each time slice is typically spread across all nodes that existed when the time interval was opened. So this greatly ameliorates the interesting "time" problem you mention.…

I was disappointed to see that Adaptive Chunking is deprecated[1]. Are there future plans to ~replace this functionality? [1] https://docs.timescale.com/latest/api#set_adaptive_chunking

We deprecated Adaptive Chunking because we weren't thrilled with the way it was working. But yes we are looking into an improved way of solving this problem.

Re: Building a distributed time-series database on PostgreSQL

#70
post #54

I just came here to tell how happy I am with Timescaledb. I have almost 8 tables with over 60Million rows and I'm very happy with the performance. Considering I have a t2.medium instance(2 CPUs with 4GB RAM). Like, everyone else mentioned, having AWS hosted option will be awesome! Is there a way to optimize storage? I have set chunk size to 1 day interval . About 2 million rows per day writes. My many thanks to the e…

Re: optimizing storage, we are working on bringing native compression to TimescaleDB. So far the results are really promising. If you're interested in testing out an early version feel free to reach out - ajay (at) timescale.com.
Post reply on HN