惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News | PayPal Newsroom
Security Archives - TechRepublic
Security Archives - TechRepublic
Hacker News: Ask HN
Hacker News: Ask HN
H
Hacker News: Front Page
Apple Machine Learning Research
Apple Machine Learning Research
TaoSecurity Blog
TaoSecurity Blog
Help Net Security
Help Net Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
V
V2EX
Hugging Face - Blog
Hugging Face - Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
人人都是产品经理
人人都是产品经理
博客园 - 三生石上(FineUI控件)
Security Latest
Security Latest
Cloudbric
Cloudbric
WordPress大学
WordPress大学
S
SegmentFault 最新的问题
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Know Your Adversary
Know Your Adversary
A
Arctic Wolf
L
LangChain Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
The GitHub Blog
The GitHub Blog
P
Proofpoint News Feed
W
WeLiveSecurity
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
M
MIT News - Artificial intelligence
Google DeepMind News
Google DeepMind News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Cloudflare Blog
小众软件
小众软件
NISL@THU
NISL@THU
云风的 BLOG
云风的 BLOG
P
Privacy & Cybersecurity Law Blog
S
Security @ Cisco Blogs
博客园 - 【当耐特】
I
InfoQ
Vercel News
Vercel News
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
P
Proofpoint News Feed
O
OpenAI News
Google DeepMind News
Google DeepMind News
N
News and Events Feed by Topic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
K
Kaspersky official blog
T
Threat Research - Cisco Blogs
量子位
宝玉的分享
宝玉的分享

ClickHouse

有没有熟悉 clickhouse 的? clickhouse 对于分布式支持的如何? ClickHouse 的 MaterializedMySQL 引擎 - V2EX 两条数据库创建语句产生了同样的效果 CREATE DATABASE hello1; 与 CREATE DATABASE hello ON CLUSTER 'xxxxx'; 大佬们,我又来了!群晖装 clickhouse,撑得住吗? 究竟是什么在占用着内存 求大佬优化一下 3000 万数据的 NOT IN 查询 clickhouse 文档里的划分冷热多盘存储配置真的是按时间划分冷热数据的吗? - V2EX 请教各位大佬关于 clickhouse 的问题 - V2EX 我这个场景, clickhouse 适用吗? - V2EX
求大佬优化 3000w 数据多 UNION
dollck · 2022-11-10 · via ClickHouse
lookStupiToForce

11

lookStupiToForce      2022 年 11 月 10 日   ❤️ 1

其他支持 array 字段类型 和 倒排索引 的数据库倒是有法子
就是把这六个列的数据当作一个 array 存起来,查的时候用倒排索引去查

1. add array column
2. set new_array_column = array[value1, value2, ..., value6]
3. select * from A where new_array_column @> array['1']

这样只用查一次倒排索引就能解决问题,可以避免 union 查 6 次索引的开销,而且你题目中还要用 distinct 去重,也就是说要对六个结果集进行一次综合排序,这额外开销太大了。

不知道 clickhouse 支不支持上面说的两样关键东西[array 字段类型]和[倒排索引],支持的话就好办,不支持的话 op 你只能参照这个基本思想去聚合六个字段的内容到一个字段,自己想办法结合查询条件去实现这个字段怎么存内容了