6 ms·
Clickhouse Local
- 1996 7y agoClickhouse is one of the most underrated databases. This basically replaces most of my usages of SQLite. When its SQL "dialect" matures, Clickhouse will eat MySQL lunch, then PostgreSQL.
- oreoftw 7y agoFor analytics - sure. Clickhouse was not designed to handle OLTP workload, there's no transaction support.
- 1996 7y agoI cringe a bit inside at people using say nosql approaches when it makes literally no sense to do so. Therefore I think the lack of OLTP will not matter much and that clickhouse will be widely used, but also misused when it becomes too fashionable.
- joelwilsson 7y agoSure - but the comment you're replying to made no mention of NoSQL. It just said Clickhouse lacks OLTP by design, that doesn't mean it won't be widely used, just that it will perhaps be limited to analytics workloads. If you need deletes and transactions, look elsewhere, but Clickhouse seems to be great for what it's been designed for.
- atombender 7y agoThis makes no sense. For example, aside from the lack of transactions, Clickhouse is designed for insertion. There's an INSERT statement, but no UPDATE or DELETE statements. You can rewrite tables (there's ALTER TABLE ... UPDATE and ALTER TABLE ... DELETE), but they're intended for large batch operations, and the operations potentially asynchronous, meaning that they complete right away, but you only see results later. ClickHouse has many other limitations. For example, there's no enforcement of uniqueness: You can insert the same primary key multiple times. You can dedupe the data, but only specific table engines support this. There's absolutely no way anyone will want to use ClickHouse as a general-purpose database.
- 1996 7y agoI should have phrased that differently: if something is good enough in some key metric, it extends to other uses - even if it makes a poor fit. So I insist: everyone will WANT to use clickhouse as a general purpose database, and will create ways to make it so (ex: copy table with the columns you don't want filtered out, drop the original, rename) It is just too fast and too good for many other things, so it will expand from these strongholds to the rest. A personal example: I am migrating my cold storage to clickhouse, because I can just copy the files in place and be up and running. I know about insert and the likes, I have a great existing system - but this lets me simplify the design, and deprecate many things. Fewer moving parts is in general better. After that is done, there is a database where I would benefit from things like alter tables or advanced joins, but keeping PostgreSQL and ClickHouse side by side, just for this? No. PostgreSQL will go. Dirty tricks will be deployed. Data will be duplicated if necessary.
- hodgesrm 7y agoAdvanced joins (specifically merge joins) and object storage are on the way. See the following PRs: * https://github.com/ClickHouse/ClickHouse/pulls?q=is%3Apr+mergejoin https://github.com/ClickHouse/ClickHouse/pulls?q=is%3Apr+mer... -- Recent work to enable merge joins * https://github.com/ClickHouse/ClickHouse/pulls?q=is%3Apr+s3 https://github.com/ClickHouse/ClickHouse/pulls?q=is%3Apr+s3 -- Same thing for managing data on S3 compatible object storage There's been a lot of community interest in both topics. Merge join work is largely driven by the ClickHouse team at Yandex. Object storage contributions are from a wider range of teams. That said I don't see ClickHouse replacing OLTP databases any time soon. It's an analytic store and many of the design choices favor fast, resource efficient scanning and aggregation over large datasets. ClickHouse is not the right choice for high levels of concurrent users working on mutable point data. For this Redis, PostgreSQL, or MySQL are your friends.
- deepsun 7y agoNo, Clickhouse doesn't support UPDATEs, and schema changes are even harder than in classic SQL DBs. But we love it anyway :)
- polskibus 7y agoI wonder how performant this is in comparison to other quick and dirty methods to work on local files like bash, pythonz etc.
- hodgesrm 7y agoIt's much faster in cases that involve significant processing. Where possible query execution is vectorized and runs in parallel on as many cores as you make available. There are some examples in the article cited by dang: https://news.ycombinator.com/item?id=20163017 https://news.ycombinator.com/item?id=20163017
- dang 7y agoA related article from last year: https://news.ycombinator.com/item?id=20163017 https://news.ycombinator.com/item?id=20163017. No comments though.
- georgewfraser 7y agoWhy do people on HN love Clickhouse so much? As far as I can tell, it’s an ordinary column store, with a bunch of limitations around distributed joins and a heuristic-based query planner. There are several good analytical databases that will give you the same scan performance and a much better query planner and executor. This is not a rhetorical question, I would really like to know why it gets so much attention here.
- oreoftw 7y agoCould you name those good analytical databases? I'd love to learn more.
- georgewfraser 7y agoSnowflake, Redshift, BigQuery, Databricks, Presto.
- dilyevsky 7y agoGithub link pls
- edmundsauto 7y agoOf those, it looks like only Presto is open source and/or free. So maybe it's a presto versus clickhouse comparison, which explains why so many choose clickhouse (it's one of only 2 options in its class).
- deepsun 7y agoPresto is not really a database, it's the SQL layer on top of many other data storages, like Hive / any other SQL DB / Redis / Cassandra / etc.
- jfim 7y agoPresto is mostly an engine that runs on top of other databases, although it does have its own query execution engine. The basic idea behind Presto is that it federates other databases, and supports doing joins across them. From what I understand, the problem that it solved at Facebook is bridging the gap between different teams; if a team has MySQL and another has files stored on HDFS, it doesn't really matter because all you do is query Presto and it'll query both under the covers. The alternative is setting up data pipelines, and dealing with the ongoing issues of maintaining those data pipelines.
- wikibob 7y agoHow Sentry.io uses Clickhouse https://blog.sentry.io/2019/05/16/introducing-snuba-sentrys-new-search-infrastructure https://blog.sentry.io/2019/05/16/introducing-snuba-sentrys-...
- vladcretu 7y agoWe do. We are also hiring. Reach out to vlad@sentry.io for more info.
- dzonga 7y agofunny thing, just learnt about clickhouse today. for experienced people that use columnar stores and pandas for analytics, which tool do you usually prefer for BI stuff ? do ya'll load data into clickhouse then analyse it using pandas. or all analysis is done via the clickhouse sql dialect. As i'm sure things like pivot tables and rolling windows are a PITA in SQL
- meritt 7y agoWhy would you bother using a database like clickhouse to store data if you're just going to analyze it in pandas? Just store it in a csv, parquet, or orc. > As i'm sure things like pivot tables and rolling windows are a PITA in SQL I can't speak for clickhouse, but group-by and window functions are a very standard part of any SQL analysts toolbelt.
- FridgeSeal 7y ago> Why would you bother using a database like clickhouse to store data if you're just going to analyze it in pandas? Because I have more data than what fits locally, there’s a data pipeline that pushes more in, and I only need to work on a subset. Storing everything in flat csv/parquet etc is useless when there’s more than fits on your local/single machine memory or if you want to search/subset etc some of the data or do anything that’s larger than memory without having to write spill-to-disk stuff in Python/pandas.
- meritt 7y agoWhere did I suggest storing the data on a local machine? Common usage when using pandas/spark/etc is storing source data in parquet/orc/etc and they fully support data partitioning. That doesn't need to come from a local machine by any means. My bigger point to the OP was why bother using a DBMS that is specifically tuned for running fast analytical queries if they only intended to use it as a storage layer and pushing all of the analysis into Python. Use a solution focused on storage, not analysis, if that's the use case.
- 7y ago
- bdcravens 7y agoClickhouse Local is great also for importing into your Clickhouse Server, where you can validate and preprocess CSVs into Clickhouse's native table format.