Hacker News new | ask | show | jobs
by zX41ZdbW 1365 days ago
Yes, ClickHouse can query Postgres for maybe two years already.

https://clickhouse.com/docs/en/integrations/postgresql/postg...

You can connect to Postgres using a table function:

SELECT ... FROM postgresql(...)

You can create a table with ENGINE = PostgreSQL and use it like a normal table.

You can create a database with ENGINE = PostgreSQL and it will represent all the tables from the PostgreSQL database.

And finally, you can replicate data from PostgreSQL in realtime with CDC into ClickHouse tables.

1 comments

Similar features available for MySQL, MongoDB and SQLite.
What is surprising: if you query MySQL from ClickHouse, the queries work faster despite the fact that the data is simply read from MySQL.

And two more use-cases: - you can create a table in ClickHouse pointing to multiple MySQL servers for sharding and failover, so ClickHouse can be used to query sharded MySQL; - you can create a key-value dictionary on top of MySQL tables and use it in JOINs.