ClickHouse / ClickHouse/pg_clickhouse
Improve Cost Discrimination for Aggregate Queries
- Dominant language
- C
- Stars
- 283
- Forks
- 21
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 11
Description
`clickhouseGetForeignPaths()` quotes low costs for all remote queries. However, it would be more accurate to consider the paths in question and attempt to better estimate costs (unless we fetch actual costs, as proposed in #129). The idea is to look at each path and, if it's an aggregate query or has a selective `WHERE` clause, give it a low cost, but if it appears to just be a table scan, give it a high cost.
It might be difficult to determine just how selective a `WHERE` clause is, short of asking ClickHouse (#129), but perhaps we could start simple, identifying queries that return a single aggregate. Perhaps we can also make use of stats collected by Postgres, though that would depend on #131.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.