ClickHouse / ClickHouse/ClickHouse

when using Engine=MySQL for table or database - can i hint ClickHouse to pass WHERE condition to underlying MySQL?

Open
#63,068 4 comments 0 reactions 0 assignees View on GitHub
comp-mysql external question
Dominant language
C++
Stars
49.9k
Forks
9k
Avg merge
21h 32m
Merged PRs (30d)
515

Description

let's say i have a MySQL database 'mounted' to ClickHouse 24.3.2 via:

```
CREATE DATABASE mydb ENGINE = MySQL('host', 'db', 'login', 'pass')
```

i've noticed that most of more complex queries lead to ClickHouse reading the whole table from MySQL.

example query:

```
SELECT * FROM content WHERE transaction_id IN ( SELECT id FROM transaction WHERE object_id=1234 )
```

while i don't expect ClickHouse to pass the whole query to MySQL - i'd love to hint ClickHouse that it should compile list of ids from the subquery and then pass it to MySQL for the outer query instead of loading whole content table from MySQL and only then doing the filtering.

thank you!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.