Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is difference between MaterializedPostgreSQL Engine and PostgreSQL Engine in Clickhouse?

Tags:

clickhouse

why we need this? since the docs say:

MaterializedPostgreSQL Creates a ClickHouse database with tables from PostgreSQL database.

PostgreSQL Allows to connect to databases on a remote PostgreSQL server.

I cannot see clearly the difference between them?

when to use each other?

like image 422
Hiep Tran Avatar asked Oct 30 '25 17:10

Hiep Tran


1 Answers

MaterializedPostgreSQL will use replication slots and will physically replicate data from PostgreSQL to ClickHouse

PostgreSQL it's just a proxy table engine. When you try SELECT FROM postgreqsql_table_engine then your clickhouse query will rewrite. GROUP BY, ORDER BY and HAVING BY sections will remove and query just proxy to remote PostgreSQL server, after it GROUP BY ORDER BY and HAVING BY clause will apply on clickhouse side.

like image 103
Slach Avatar answered Nov 02 '25 11:11

Slach



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!