HN user

pradeepchhetri

1,573 karma
Posts75
Comments68
View on HN
avi-loeb.medium.com 8mo ago

Kim Kardashian is welcome to join my Research Team on 3I/ATLAS

pradeepchhetri
3pts3
avi-loeb.medium.com 8mo ago

The Scientific Revolution of Interstellar Objects

pradeepchhetri
6pts1
clickhouse.com 9mo ago

ClickHouse's JSON datatype gets better

pradeepchhetri
6pts0
clickhouse.com 1y ago

A Postgres Mystery: The SIGTERMs do nothing!

pradeepchhetri
9pts0
clickhouse.com 1y ago

One Billion JSON Challenge

pradeepchhetri
15pts0
clickhouse.com 2y ago

Saving Millions of Dollars by Bin-Packing ClickHouse Pods in AWS EKS

pradeepchhetri
16pts2
clickhouse.com 3y ago

ClickHouse: A Fast DBMS with Full SQL Join Support

pradeepchhetri
15pts0
clickhouse.com 3y ago

Inverted Indices in ClickHouse

pradeepchhetri
28pts2
pradeepchhetri.xyz 3y ago

Query SQLite and PostgreSQL Data Using DuckDB

pradeepchhetri
3pts0
news.ycombinator.com 3y ago

Ask HN: Does https://github.com/klauspost/compress returns 502 for you?

pradeepchhetri
3pts3
pradeepchhetri.xyz 4y ago

Lesser known features of ClickHouse

pradeepchhetri
158pts33
victoriametrics.com 4y ago

Pricing Comparison for Managed Prometheus

pradeepchhetri
2pts0
clickhouse.com 4y ago

Building a Paste Service with ClickHouse

pradeepchhetri
3pts0
pradeepchhetri.xyz 4y ago

New Databases to keep an eye on in 2022

pradeepchhetri
11pts0
pradeepchhetri.xyz 4y ago

ClickHouse vs TimescaleDB

pradeepchhetri
2pts0
pradeepchhetri.xyz 4y ago

ClickHouse vs TimescaleDB

pradeepchhetri
15pts7
asatarin.github.io 4y ago

Testing Distributed Systems

pradeepchhetri
4pts0
jvns.ca 4y ago

Nginx Playground

pradeepchhetri
603pts41
pradeepchhetri.com 5y ago

New OLAP Database: DuckDB

pradeepchhetri
3pts0
news.ycombinator.com 6y ago

Ask HN: Good references for oncall alert reference

pradeepchhetri
1pts0
stripe.com 8y ago

Networking for founders

pradeepchhetri
3pts0
medium.com 8y ago

Running a modern infrastructure on Kubernetes

pradeepchhetri
3pts0
medium.com 8y ago

Running a modern infrastructure on Kubernetes

pradeepchhetri
1pts0
medium.com 8y ago

Running a modern infrastructure on kubernetes

pradeepchhetri
2pts0
medium.com 8y ago

Running a modern infrastructure on Kubernetes

pradeepchhetri
2pts0
medium.com 8y ago

Running a modern infrastructure on Kubernetes

pradeepchhetri
1pts0
www.confluent.io 8y ago

Should You Put Several Event Types in the Same Kafka Topic?

pradeepchhetri
2pts0
krebsonsecurity.com 8y ago

Website Glitch Let Me Overstock My Coinbase

pradeepchhetri
5pts0
medium.com 8y ago

Running a Lagom microservice on Akka Cluster with split-brain resolver

pradeepchhetri
2pts0
www.confluent.io 8y ago

Apache Kafka Goes 1.0

pradeepchhetri
392pts134

clickhouse-local is similar to duckdb, you don't need a clickhouse-server running in order to use clickhouse-local. You just need to download the clickhouse binary and start using it.

  clickhouse local
  ClickHouse local version 25.4.1.1143 (official build).

  :)
There are few benefits of using clickhouse-local since ClickHouse can just do lot more than DuckDB. One such example is handling compressed files. ClickHouse can handle compressed files with formats ranging from zstd, lz4, snappy, gz, xz, bz2, zip, tar, 7zip.
  clickhouse local --query "SELECT count() FROM file('top-1m-2018-01-10.csv.zip :: *.csv')"
  1000000
Also clickhouse-local is much more efficient in handling big csv files[0]

[0] https://www.vantage.sh/blog/clickhouse-local-vs-duckdb

I prefer to use clickhouse-local for all my CSV needs as I don't need to learn a new language (or cli flags) and can just leverage SQL.

    clickhouse local --file medias.csv --query "SELECT edito, count() AS count from table group by all order by count FORMAT PrettyCompact"

   ┌─edito──────┬─count─┐
   │ agence     │     1 │
   │ agrégateur │    10 │
   │ plateforme │    14 │
   │ individu   │    30 │
   │ media      │   423 │
   └────────────┴───────┘
With clickhouse-local, I can do lot more as I can leverage full power of clickhouse.

To my knowledge, both Postgres and MySQL has their own strengths and weaknesses. Example: mvcc implementation, data replication, connection pooling and difficulty of upgrades were the major weaknesses of Postgres which are much improved over time. Similarly mysql query optimizer is consider lesser developed than that of Postgres's.

Overall I think Postgres adoption and integrations and thus community is much more wider than MySQL which gives it major advantage over MySQL. Also looking at the number of database-as-a-service companies of Postgres vs those of MySQL we can immediately acknowledges that Postgres is much widely adopted.

If I had to only pick two databases to deal with, I’d be quite happy with just Postgres and ClickHouse - the former for OLTP, the latter for OLAP.

As the author mentioned, I completely agree with this statement. In fact, many companies like Cloudflare are built with exactly this approach and it has scaled them pretty well without the need of any third database.

Another reason I suggest checking out ClickHouse is that it is a joy to operate - deployment, scaling, backups and so on are well documented - even down to setting the right CPU governor is covered.

Another point mentioned by author which is worth highlighting is the ease of deployment. Most distributed databases aren't so easy to run at scale, ClickHouse is much much easier and it has become even more easier with efficient storage-compute separation.

I would recommend using ClickHouse which provides very efficient compression and thus reduces the size of data drastically.

Apart from that, it provides various other feature:

- Dynamic datatype [0] which are very useful for semi-structured fields which generally logs contains very often.

- You can configure column's & table's TTL [1] which provides efficient way to configure retention.

At my previous job (Cloudflare), we migrated from Elasticsearch to ClickHouse and saved nearly 10x reduction in data size and got 5x perf improvement. You can read more about it [2] and watch the recording here [3]

Recently, ClickHouse engineers published a wondering detailed blog about their logging pipeline [4]

[0] https://clickhouse.com/docs/en/sql-reference/data-types/dyna...

[1] https://clickhouse.com/docs/en/engines/table-engines/mergetr...

[2] https://blog.cloudflare.com/log-analytics-using-clickhouse

[3] https://vimeo.com/730379928

[4] https://clickhouse.com/blog/building-a-logging-platform-with...

I would recommend to look at ClickHouse[0] which is Apache-License and is completely open-source. You can self-host it and it is one of the fastest growing OLAP database. It has good integrations with BI tools and it can be used for wide varieties of use cases. It is widely adopted[1]. I would recommend you to give it a try and validate it for your use-case.

I work for ClickHouse and available for any queries or help you need.

[0] https://clickhouse.com/ [1]: https://clickhouse.com/docs/en/about-us/adopters

Reading through this blog, to me it seems Parquet is lot like ClickHouse native data format.

Best part of ClickHouse native data format is I can use the same ClickHouse queries and can run in local or remote server/cluster and let ClickHouse to decide the available resources in the most performant way.

ClickHouse has a native and the fastest integration with Parquet so i can:

- Query local/s3 parquet data from command line using clickhouse-local.

- Query large amount of local/s3 data programmatically by offloading it to clickhouse server/cluster which can do processing in distributed fashion.

Postgres is still way ahead of ClickHouse in terms of operational simplicity

Having served as both ClickHouse and Postgres SRE, I don't agree with this statement.

- Minimal downtime major version upgrades in PostgreSQL is very challenging.

- glibc version upgrade breaks postgres indices. This basically prevents from upgrading linux OS.

And there are other things which makes postgres operationally difficult.

Any database with primary-replica architecture is operationally difficult IMO.

Definitely clickhouse ecosystem.

- For querying csv data from command line, I use clickhouse-local.

- For querying csv data programmatically using a library, I use chdb (embedded version of clickhouse)

- For querying large amount of csv data programmatically, I offload it to clickhouse cluster which can do processing in distributed fashion.

If you are looking from query performance perspective, this blog is useful: https://www.vantage.sh/blog/clickhouse-local-vs-duckdb

I enjoy using clickhouse-local for parsing csv files. I generally hit situations where I need custom delimiter and custom parsing rules, I find it handles all of these edge cases very well. Recently I found that if my csv files are compressed, i don't even need to uncompress them, it auto-magically figures out the compression format and process it for me.

I would consider following things before selecting a database offering:

- Whether the database vendor is a lock-in. It would be a straight "NO" for me if the database isn't open-source with proper license, since I can't self-host it in case, I need to move away from their SaaS offering due to various unexpected foreseen reasons: vendor decided to increase pricing, vendor has hidden pricing, vendor has reliability issues etc etc.

- How big is the community behind the database. Check their public forums to understand how community feels about the database and how their requirements are considered.

- Don't believe any random benchmarking post online but by doing my own benchmarking for my use-case.

- Check which other companies have adopted that database and read their experiences.

As an SRE, I used to install one tool for every data format until I came across clickhouse-local. Now I use it for everything.

- It works with every data format which I come across in my daily job. It support data formats like Protobuf, Avro, Cap'n Proto which regular tools don't support. Funny thing, it can even read mysql dumps.

- I can read the data stored in local or remote location like http, s3, gcs, azure and whatever location I can think of.

- I can SQL queries on the raw data and improve my SQL skills on daily basis.