ClickHouse / ClickHouse/pg_clickhouse
Implement the `AnalyzeForeignTable` Callback
- Dominant language
- C
- Stars
- 283
- Forks
- 21
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 11
Description
Currently, our implementation of the `AnalyzeForeignTable` callback, `clickhouseAnalyzeForeignTable()`, assigns a no-op function. Borrow from the postgres_fdw implementation to fetch a table size from `system.tables` or `system.parts` (maybe [like this](https://gist.github.com/sanchezzzhak/511fd140e8809857f8f1d84ddb937015)?), and to assign an estimation function that uses [SELECT SAMPLE](https://clickhouse.com/docs/sql-reference/statements/select/sample) to generate stats. Determine whether this might impose too much storage overhead for stats on hyper large ClickHouse tables, or document how to keep them within reason (and perhaps auto-select the sample size in `IMPORT SCHEMA`?).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.