News for hackers. Stuff that matters.
Re:Updating a 50 terabyte PostgreSQL database (2018) by pupdogg on Monday March 22, 2021 @06:25AM (#26538873)
Based on their numbers, they should be archiving their historical data in parquet format partitioned by YYYYMMDD onto something like Clickhouse. This way, they can run a lean Postgres instance(s) at all times yet still get benefits of real-time reporting. Based on their use case, they can retain up-to 30 days of data in Postgres and offload the rest onto Clickhouse.
Re:Updating a 50 terabyte PostgreSQL database (2018) by KptMarchewa on Monday March 22, 2021 @06:49AM (#26539057)
You assume too much. For example, you assume that analytics aren't already run on a separate data warehouse.

Ease of accessing older data is an important aspect of database holding transaction (not meaning transactional db). Wouldn't you want to check your transactions on bank page that are older than 30 days?

Re:Updating a 50 terabyte PostgreSQL database (2018) by manigandham on Monday March 22, 2021 @07:00AM (#26539144)
All modern columnnar/analytical databases have no problem in pulling back older data; in fact, that's the point of running large scale analytics.
Re:Updating a 50 terabyte PostgreSQL database (2018) by KptMarchewa on Monday March 22, 2021 @09:08AM (#26540253)
I agree, but analytics is orthogonal topic.

Unless you want to use columnar database to retrieve 15 transaction that particular user did month ago...

Re:Updating a 50 terabyte PostgreSQL database (2018) by manigandham on Monday March 22, 2021 @09:16AM (#26540334)
There is nothing wrong with that use case. It works just fine. It may not have the same latency as an OLTP database but there are many factors (indexing, sort/partition keys, compression, etc) that can return similar performance for those queries.
Re:Updating a 50 terabyte PostgreSQL database (2018) by KptMarchewa on Monday March 22, 2021 @09:21AM (#26540393)
Just to clarify what you advocate for: you want to run this type of queries on analytical databases (like Snowflake, Redshift etc) to display 10 rows on frontend device?

    select * from transactions where user_id='asdf' and completed_date <'2021-02-01' and completed_date >= '2021-01-01'
Re:Updating a 50 terabyte PostgreSQL database (2018) by manigandham on Monday March 22, 2021 @09:25AM (#26540439)
Sure. Again the database and data layout make a difference. Snowflake has startup latency since the "warehouse" might not be running but Redshift will do fine, along with many others that are always on.
Re:Updating a 50 terabyte PostgreSQL database (2018) by darksaints on Monday March 22, 2021 @09:56AM (#26540809)
Redshift has some pretty significant and fairly unpredictable per-query overhead. For example, all queries are compiled, then code is distributed to every node in the cluster, then executed and gathered before returning. And most analytics databases use a scheduled execution model, which can delay execution from a couple seconds to several minutes, depending on database loads.
Re:Updating a 50 terabyte PostgreSQL database (2018) by pupdogg on Monday March 22, 2021 @08:56AM (#26540132)
Your comment clearly illustrates that you have no working knowledge of Clickhouse or parquet file format or data archiving capabilities available in 2021. It's OK! I was in the same boat until I needed to implement such a solution for my use case. What I'm suggesting does not limit their customers from searching any historical data. Matter of fact, it might be 100x to 1000x faster for them to do so with the suggested solution. I strongly believe that mission critical transactional databases (postgres in this case) MUST be run very lean to keep their app running at hyper speeds at all times. 50TB overhead seems very inefficient when you take into account the the low cost solutions available in this day and age.

Based on my personal experience of achieving 94% compression on 2TB of data using snappy parquet file format, they could be looking at a final dataset size of 3.5TB on Clickhouse.

Re:Updating a 50 terabyte PostgreSQL database (2018) by dang on Monday March 22, 2021 @02:19PM (#26544601)
> Your comment clearly illustrates that you have no working knowledge

Please omit swipes like that from your comments here. The rest of your comment would be find without that bit.

https://news.ycombinator.com/newsguidelines.html

Re:Updating a 50 terabyte PostgreSQL database (2018) by KptMarchewa on Monday March 22, 2021 @09:09AM (#26540267)
>Matter of fact, it might be 100x to 1000x faster for them to do so with the suggested solution.

That must be trolling. 1000x faster than single digit millisecond indexed query retrieving 15 rows?

The fact that you keep talking about storage size means that you're talking about analytics not transactional needs.

>Your comment clearly illustrates that you have no working knowledge of Clickhouse or parquet file format or data archiving capabilities available in 2021. It's OK! I was in the same boat until I needed to implement such a solution for my use case.

Also, fuck off with that condescension.

Re:Updating a 50 terabyte PostgreSQL database (2018) by dang on Monday March 22, 2021 @02:20PM (#26544615)
> fuck off with that condescension

Please follow the site guidelines, regardless of whether or not someone else has broken them. Otherwise we just get a downward spiral.

https://news.ycombinator.com/newsguidelines.html

Re:Updating a 50 terabyte PostgreSQL database (2018) by KptMarchewa on Monday March 22, 2021 @07:58PM (#26549171)
Sorry, I get way too heated when I see this type of condescending argumentation.
Re:Updating a 50 terabyte PostgreSQL database (2018) by dang on Monday March 22, 2021 @09:26PM (#26549856)
Yes, I experience that too and I bet most people do. One way I often explain this that seems to work well is this:

https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...