# ClickHouse database and Julia

**URL:** <https://discourse.julialang.org/t/clickhouse-database-and-julia/14281>\
**Category:** Internals & Design\
**Tags:** question\
**Created:** [August 29, 2018, 11:24pm UTC](https://discourse.julialang.org/t/clickhouse-database-and-julia/14281 "2018-08-29T23:24:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yifan\_Liu](https://avatars.discourse-cdn.com/v4/letter/y/4da419/32.png) [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Post date:** [August 29, 2018, 11:24pm UTC](https://discourse.julialang.org/t/clickhouse-database-and-julia/14281/1 "2018-08-29T23:24:13Z")

</div>

For the last 3 years, I have been tortured by the slowness of Postgresql, and recently I came across this open source columnar database called clickhouse. The speed is unexpectedly fast, especially when I need to run a lot of queries.  
I understand that Julians at this moment are still working on some traditional sql database APIs, but this clickhouse really deserves some attention.

[https://hackernoon.com/clickhouse-an-analytics-database-for-the-21st-century-82d3828f79cc](https://hackernoon.com/clickhouse-an-analytics-database-for-the-21st-century-82d3828f79cc)

Some benchmarks:  
[https://clickhouse.yandex/benchmark.html](https://clickhouse.yandex/benchmark.html)

---

<div class="post-metadata">

**Author:** ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Post date:** [August 29, 2018, 11:39pm UTC](https://discourse.julialang.org/t/clickhouse-database-and-julia/14281/2 "2018-08-29T23:39:23Z")

</div>

Hm, interesting. I’ve recently started to have to use Postgres more, and indeed I am getting nervous that it is going to be painfully slow.

It has a [JDBC driver](https://clickhouse.yandex/docs/en/interfaces/jdbc/) as well as an HTTP interface, so you can already use it with Julia if you really want to (should be quite trivial to use JDBC.jl for it). I don’t see docs here for the C or C++ API.

I was recently looking through some of the documentation of [arangodb](https://github.com/arangodb/arangodb), but so many people around me seem to have a phobia and or hatred of non-tabular formats.

---

<div class="post-metadata">

**Author:** ![Yifan\_Liu](https://avatars.discourse-cdn.com/v4/letter/y/4da419/32.png) [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Post date:** [August 29, 2018, 11:50pm UTC](https://discourse.julialang.org/t/clickhouse-database-and-julia/14281/3 "2018-08-29T23:50:48Z")

</div>

I haven’t used any Postgresql since I started using MonetDB, and I think MonetDB is fast enough for me. Then I tried clickhouse, it felt lightning fast though its sql dialect seems a little bit different.

Both Python and R now have API with MonetDB and clickhouse. I really think the tidyverse ecosystem in R makes a huge difference when it comes to using external database. It allows me to use dplyr syntax instead of having to learn a new sql dialect every time when I want to try a new sql database. The dplyr codes are translated into sql codes and the translated sql codes stay in the database and there is no performance loss. Hopefully, Julia will have an unified data science ecosystem like this.

---

<div class="post-metadata">

**Author:** ![scelles](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scelles/32/220408_2.png) [@scelles](https://discourse.julialang.org/u/scelles)\
**Post date:** [June 5, 2019, 2:49pm UTC](https://discourse.julialang.org/t/clickhouse-database-and-julia/14281/4 "2019-06-05T14:49:27Z")

</div>

@ExpandingMan If you are nervous about Postgres being painfully slow and want to deal with time series maybe you should try TimescaleDB [TimescaleDB vs. PostgreSQL for time-series](https://blog.timescale.com/timescaledb-vs-6a696248104e/)

---

<div class="post-metadata">

**Author:** ![phelipe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/phelipe/32/14643_2.png) [@phelipe](https://discourse.julialang.org/u/phelipe)\
**Post date:** [June 5, 2019, 3:10pm UTC](https://discourse.julialang.org/t/clickhouse-database-and-julia/14281/5 "2019-06-05T15:10:58Z")

</div>

There is a package:

> **[GitHub - maxmouchet/ClickHouse.jl: Julia client for ClickHouse with...](https://github.com/maxmouchet/ClickHouse.jl)**
>
> Julia client for ClickHouse with dataframes support. - GitHub - maxmouchet/ClickHouse.jl: Julia client for ClickHouse with dataframes support.
