# MyScaleDB 1.x 与 ClickHouse 23.3 兼容性
# 目录
# 概述
本文件旨在详细说明 MyScale 与 ClickHouse 23.3 版本的兼容性,并列出 MyScale 中新增或增强的功能,这些功能在 ClickHouse 当前版本中不存在。
# 新增特性
# 向量索引
# 描述
MyScale中提供向量索引,用于高效地处理和查询向量数据。此功能类似于 ClickHouse 23.3 版本中的 Distance 表函数,但是Myscale中实现的向量索引更高效,更精确。详细参考文档见:基本向量搜索
# 倒排索引
# 描述
Myscale中基于BM25算法提供了一种更高效易用的倒排索引,用于高效地进行全文搜索。同时在倒排索引与向量索引的基础上,MyScale增加了融合搜索,帮助用户更好的将向量与全文搜索结合,来获取自己想要的结果。详细参考文档见:全文搜索
# 从其他版本引入的功能或修复
- 支持从 S3 读取空文件 
 PR52733 (opens new window)
 PR52763 (opens new window)
 PR49519 (opens new window)
- 修复将附加文件写入增量备份的问题 
 PR49725 (opens new window)
- 报告加载失败的 Executable Dict 的正确状态 (FAILED) 
 PR48775 (opens new window)
- 当外部命令的 stderr 流有数据时添加不同的行为 
 PR43210 (opens new window)
- 正确销毁 ShellCommandSource 中的任务 
 PR53573 (opens new window)
- 修复 shell 命令的数据竞争 
 PR53631 (opens new window)
- 在 ShellCommandSource 的构造函数发生异常的情况下进行适当的清理 
 PR55103 (opens new window)
- 在 ReplicatedMergeTree 中使用默认的 {replica}、{shard} 参数 
 PR48961 (opens new window)
- 对 ALTER 语句在一个分片的 Replicated 数据库上的执行进行优化 
 PR51049 (opens new window)
- 选择要合并的 Part 时考虑已删除的行 
 PR58223 (opens new window)
# 默认启用的实验特性
# 表引擎配置
- allow_experimental_database_replicated
# 会话配置
- allow_experimental_object_type
# 修改的默认配置
配置参数介绍详见 ClickHouse 官方文档
# Server 配置
- max_connections: 1024 -> 4096
- max_concurrent_queries: 0(无限制) -> 1000
- disable_internal_dns_cache: 0 -> 1
- max_table_size_to_drop: 50000000000 -> 1000000000000
- uncompressed_cache_size: 0(未启用) -> DYNAMIC_SETTING(由 server 内存动态调整)
- mark_cache_size: 0(未启用) -> DYNAMIC_SETTING(由 server 内存动态调整)
# 表引擎配置
- index_granularity: 8192 -> 128
- merge_max_block_size: 8192 -> 256
- max_bytes_to_merge_at_max_space_in_pool: 161061273600 -> 5368709120
- number_of_free_entries_in_pool_to_lower_max_size_of_merge: 8 -> 2
- number_of_free_entries_in_pool_to_execute_mutation: 20 -> 2
- old_parts_lifetime: 480 -> 5
- simple_merge_selector_base: 5 -> 1.2
# 会话配置
- min_insert_block_size_bytes: 268402944 -> 33554432
- max_query_size: 262144 -> 262144000
- connect_timeout_with_failover_ms: 50 -> 5000
- use_uncompressed_cache: 0 -> 1
- distributed_directory_monitor_batch_inserts: 0 -> 1
- distributed_product_mode: DENY(disable) -> GLOBAL
- send_progress_in_http_headers: 0 -> 1
- join_use_nulls: 0 -> 1
- prefer_global_in_and_join: 0 -> 1
- max_result_rows: 0(无限制) -> 10000
- default_table_engine: None(未启用) -> ReplicatedMergeTree
- mutations_sync: 0 -> 1
- allow_experimental_database_replicated: 0 -> 1
- database_replicated_allow_replicated_engine_arguments: 1 -> 0
- async_insert: 0 -> 1
- allow_experimental_object_type: 0 -> 1
- background_pool_size: 16 -> 4
- default_database_engine: Atomic -> Replicated
# 增加的配置
# Server 配置
- primary_key_cache_size- 主键缓存大小限制
 
- vector_index_cache_size- Cache 中缓存的向量索引限制
 
- vector_index_cache_size_ratio_of_memory- 向量索引缓存的内存限制(占总内存的比例)
 
- vector_index_build_size_ratio_of_memory- 向量索引构建的内存限制(占总内存的比例)
 
- enable_brute_force_vector_search- 启用向量搜索的暴力搜索
 
# 表引擎配置
- enable_primary_key_cache- 向量搜索时启用主键缓存
 
- enable_decouple_vector_index- 在 Part 合并和向量搜索期间启用使用旧向量索引。
 
- enable_rebuild_for_decouple- 在 Decouple Part 上启用新向量索引的重建。
 
- min_rows_to_build_vector_index- 构建向量索引的最低行数限制
 
- min_bytes_to_build_vector_index- 构建向量索引的最低字节大小限制
 
- float_vector_search_metric_type- Float 类型向量进行向量搜索默认的 Metric Type
 
- binary_vector_search_metric_type- Binary 类型向量进行向量搜索默认的 Metric Type
 
- max_rows_for_slow_mode_single_vector_index_build- 使用慢速模式构建向量索引的数据部分的最大行数
 
- default_mstg_disk_mode- 默认使用的 disk mode 模式
 
- vector_index_parameter_check- 启用向量索引的参数检查
 
- vidx_zk_update_period- 后台更新 zk 上向量索引信息的时间间隔
 
- vector_index_cache_recheck_interval_seconds- 执行删除遗留向量索引 cache 后台操作时间间隔。
 
- build_vector_index_on_random_single_replica- 在不同的副本上随机构建向量索引
 
# 会话配置
- database_replicated_always_execute_with_on_cluster- 始终在集群的所有副本上创建或删除复制数据库
 
- database_replicated_default_cluster_name- 创建或删除复制数据库的集群的名称
 
- database_replicated_allow_explicit_arguments- 允许使用显式参数创建复制数据库
 
- database_replicated_always_convert_table_to_replicated- 始终使用 Replicated 引擎将数据库中的表转换为 Replicated 表
 
- database_replicated_default_zk_path_prefix- 创建数据库时用此前缀+数据库名称填写复制数据库引擎zk_path。如果为空,zk_path不会自动设置
 
- optimize_move_to_prewhere_for_vector_search- 启用或禁用 SELECT 查询中向量搜索的特殊 PREWHERE 优化,将所有可行的 WHERE 移动到 PREWHERE。
 
- two_stage_search_option- 向量搜索时启用两阶段搜索
 
- enable_brute_force_vector_search- 向量搜索时启用暴力搜索
 
- max_build_index_train_block_size- 用于构建索引训练的最大块大小(以字节为单位)
 
- max_build_binary_vector_index_train_block_size- 用于训练的最大块大小(以字节为单位)构建索引中的 binary 向量
 
- max_build_index_add_block_size- 在一轮构建索引中添加向量的最大块大小(以字节为单位)
 
# 其他配置
- vector_index_event_log- 向量索引事件表配置
 
- vector_index_cache_path- 向量索引 cache 目录
 
- tantivy_index_cache_path- 全文索引向量cache 目录
 
 京公网安备 11010802042981号
      京公网安备 11010802042981号