ClickHouse/docs/zh/operations/table_engines/index.md

69 lines
4.1 KiB
Markdown
Raw Normal View History

CLICKHOUSE-3751: stem terms while searching docs (#3522) * CLICKHOUSE-4063: less manual html @ index.md * CLICKHOUSE-4063: recommend markdown="1" in README.md * CLICKHOUSE-4003: manually purge custom.css for now * CLICKHOUSE-4064: expand <details> before any print (including to pdf) * CLICKHOUSE-3927: rearrange interfaces/formats.md a bit * CLICKHOUSE-3306: add few http headers * Remove copy-paste introduced in #3392 * Hopefully better chinese fonts #3392 * get rid of tabs @ custom.css * Apply comments and patch from #3384 * Add jdbc.md to ToC and some translation, though it still looks badly incomplete * minor punctuation * Add some backlinks to official website from mirrors that just blindly take markdown sources * Do not make fonts extra light * find . -name '*.md' -type f | xargs -I{} perl -pi -e 's//g' {} * find . -name '*.md' -type f | xargs -I{} perl -pi -e 's/ sql/g' {} * Remove outdated stuff from roadmap.md * Not so light font on front page too * Refactor Chinese formats.md to match recent changes in other languages * Update some links on front page * Remove some outdated comment * Add twitter link to front page * More front page links tuning * Add Amsterdam meetup link * Smaller font to avoid second line * Add Amsterdam link to README.md * Proper docs nav translation * Back to 300 font-weight except Chinese * fix docs build * Update Amsterdam link * remove symlinks * more zh punctuation * apply lost comment by @zhang2014 * Apply comments by @zhang2014 from #3417 * Remove Beijing link * rm incorrect symlink * restore content of docs/zh/operations/table_engines/index.md * CLICKHOUSE-3751: stem terms while searching docs
2018-11-01 18:00:43 +00:00
# 表引擎
表引擎(即表的类型)决定了:
* 数据的存储方式和位置,写到哪里以及从哪里读取数据
* 支持哪些查询以及如何支持。
* 并发数据访问。
* 索引的使用(如果存在)。
* 是否可以执行多线程请求。
* 数据复制参数。
# 引擎类型
## MergeTree
CLICKHOUSE-3751: stem terms while searching docs (#3522) * CLICKHOUSE-4063: less manual html @ index.md * CLICKHOUSE-4063: recommend markdown="1" in README.md * CLICKHOUSE-4003: manually purge custom.css for now * CLICKHOUSE-4064: expand <details> before any print (including to pdf) * CLICKHOUSE-3927: rearrange interfaces/formats.md a bit * CLICKHOUSE-3306: add few http headers * Remove copy-paste introduced in #3392 * Hopefully better chinese fonts #3392 * get rid of tabs @ custom.css * Apply comments and patch from #3384 * Add jdbc.md to ToC and some translation, though it still looks badly incomplete * minor punctuation * Add some backlinks to official website from mirrors that just blindly take markdown sources * Do not make fonts extra light * find . -name '*.md' -type f | xargs -I{} perl -pi -e 's//g' {} * find . -name '*.md' -type f | xargs -I{} perl -pi -e 's/ sql/g' {} * Remove outdated stuff from roadmap.md * Not so light font on front page too * Refactor Chinese formats.md to match recent changes in other languages * Update some links on front page * Remove some outdated comment * Add twitter link to front page * More front page links tuning * Add Amsterdam meetup link * Smaller font to avoid second line * Add Amsterdam link to README.md * Proper docs nav translation * Back to 300 font-weight except Chinese * fix docs build * Update Amsterdam link * remove symlinks * more zh punctuation * apply lost comment by @zhang2014 * Apply comments by @zhang2014 from #3417 * Remove Beijing link * rm incorrect symlink * restore content of docs/zh/operations/table_engines/index.md * CLICKHOUSE-3751: stem terms while searching docs
2018-11-01 18:00:43 +00:00
适用于高负载任务的最通用和功能最强大的表引擎。这些引擎的共同特点是可以快速插入数据并进行后续的后台数据处理。 MergeTree系列引擎支持数据复制使用[Replicated*](https://clickhouse.yandex/docs/en/operations/table_engines/replication/) 的引擎版本),分区和一些其他引擎不支持的其他功能。
该类型的引擎:
* [MergeTree](https://clickhouse.yandex/docs/en/operations/table_engines/mergetree/)
* [ReplacingMergeTree](https://clickhouse.yandex/docs/en/operations/table_engines/replacingmergetree/)
* [SummingMergeTree](https://clickhouse.yandex/docs/en/operations/table_engines/summingmergetree/)
* [AggregatingMergeTree](https://clickhouse.yandex/docs/en/operations/table_engines/aggregatingmergetree/)
* [CollapsingMergeTree](https://clickhouse.yandex/docs/en/operations/table_engines/collapsingmergetree/)
* [VersionedCollapsingMergeTree](https://clickhouse.yandex/docs/en/operations/table_engines/versionedcollapsingmergetree/)
* [GraphiteMergeTree](https://clickhouse.yandex/docs/en/operations/table_engines/graphitemergetree/)
## Log
具有最小功能的[轻量级引擎](https://clickhouse.yandex/docs/en/operations/table_engines/log_family/)。当您需要快速写入许多小表最多约100万行并在以后整体读取它们时该类型的引擎是最有效的。
该类型的引擎:
* [TinyLog](https://clickhouse.yandex/docs/en/operations/table_engines/tinylog/
* [StripeLog](https://clickhouse.yandex/docs/en/operations/table_engines/stripelog/
* [Log](https://clickhouse.yandex/docs/en/operations/table_engines/log/
## Intergation engines
用于与其他的数据存储与处理系统集成的引擎。
该类型的引擎:
* [Kafka](https://clickhouse.yandex/docs/en/operations/table_engines/kafka/)
* [MySQL](https://clickhouse.yandex/docs/en/operations/table_engines/mysql/)
* [ODBC](https://clickhouse.yandex/docs/en/operations/table_engines/odbc/)
* [JDBC](https://clickhouse.yandex/docs/en/operations/table_engines/jdbc/)
* [HDFS](https://clickhouse.yandex/docs/en/operations/table_engines/hdfs/)
## 用于其他特定功能的引擎
该类型的引擎:
* [Distributed](https://clickhouse.yandex/docs/en/operations/table_engines/distributed/)
* [MaterializedView](https://clickhouse.yandex/docs/en/operations/table_engines/materializedview/)
* [Dictionary](https://clickhouse.yandex/docs/en/operations/table_engines/dictionary/)
* [Merge](https://clickhouse.yandex/docs/en/operations/table_engines/merge/)
* [File](https://clickhouse.yandex/docs/en/operations/table_engines/file/)
* [Null](https://clickhouse.yandex/docs/en/operations/table_engines/null/)
* [Set](https://clickhouse.yandex/docs/en/operations/table_engines/set/)
* [Join](https://clickhouse.yandex/docs/en/operations/table_engines/join/)
* [URL](https://clickhouse.yandex/docs/en/operations/table_engines/url/)
* [View](https://clickhouse.yandex/docs/en/operations/table_engines/view/)
* [Memory](https://clickhouse.yandex/docs/en/operations/table_engines/memory/)
* [Buffer](https://clickhouse.yandex/docs/en/operations/table_engines/buffer/)
#虚拟列
虚拟列是表引擎组成的一部分,它在对应的表引擎的源代码中定义。
您不能在 `CREATE TABLE` 中指定虚拟列,并且虚拟列不会包含在 `SHOW CREATE TABLE``DESCRIBE TABLE` 的查询结果中。虚拟列是只读的,所以您不能向虚拟列中写入数据。
如果想要查询虚拟列中的数据您必须在SELECT查询中包含虚拟列的名字。SELECT * 不会返回虚拟列的内容。
若您创建的表中有一列与虚拟列的名字相同,那么虚拟列将不能再被访问。我们不建议您这样做。为了避免这种列名的冲突,虚拟列的名字一般都以下划线开头。