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

推荐订阅源

Vercel News
Vercel News
SecWiki News
SecWiki News
WordPress大学
WordPress大学
小众软件
小众软件
博客园 - 司徒正美
酷 壳 – CoolShell
酷 壳 – CoolShell
V
Visual Studio Blog
Y
Y Combinator Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
云风的 BLOG
云风的 BLOG
MyScale Blog
MyScale Blog
K
Kaspersky official blog
T
The Exploit Database - CXSecurity.com
腾讯CDC
Scott Helme
Scott Helme
I
InfoQ
Cyberwarzone
Cyberwarzone
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Security Latest
Security Latest
The Register - Security
The Register - Security
Project Zero
Project Zero
F
Fortinet All Blogs
C
CERT Recently Published Vulnerability Notes
A
Arctic Wolf
C
Cisco Blogs
L
LINUX DO - 热门话题
P
Privacy International News Feed
IT之家
IT之家
U
Unit 42
P
Privacy & Cybersecurity Law Blog
H
Help Net Security
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
C
Cyber Attacks, Cyber Crime and Cyber Security
P
Palo Alto Networks Blog
F
Full Disclosure
宝玉的分享
宝玉的分享
Simon Willison's Weblog
Simon Willison's Weblog
L
Lohrmann on Cybersecurity
Google DeepMind News
Google DeepMind News
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
H
Hacker News: Front Page
Know Your Adversary
Know Your Adversary
PCI Perspectives
PCI Perspectives
Hugging Face - Blog
Hugging Face - Blog
AWS News Blog
AWS News Blog
MongoDB | Blog
MongoDB | Blog
S
Schneier on Security
Recent Announcements
Recent Announcements
Forbes - Security
Forbes - Security
Cisco Talos Blog
Cisco Talos Blog

博客园 - 雨V幕

使用chromedp 来做人工模拟操作爬取数据方法 遍历redis按照前缀给未设置过期时间的数据添加过期时间 使用rabbitmq 进行任务调度 使用trace进行排查网络瓶颈 使用vscode 调试 Python 使用power shell 拆分 csv文件 将大文件拆分成小文件。 使用postman 添加预处理验签。 go 使用pprof 进行问题排查 Mysql无主键删除重复数据的快速方法 解决mysql 事务死锁的方法 go在处理批量下载时候出现fatal error: runtime: out of memory go 序列化反序列化之后时区信息丢失 clickhouse 进行建表期间的一些优化 kraots2.0 在windows 环境搭建开发环境 Sql Server使用函数获取拼音码 关于async 和await关键字 使用kubespray 一键部署 containerd 的安装和熟悉 VMware 配置双网卡实现上网和固定ip
AnalyticDB 创建db
雨V幕 · 2024-03-13 · via 博客园 - 雨V幕
CREATE TABLE `view_records` (
  `saas_id` varchar NOT NULL COMMENT '用户id',
  `parent_id` int COMMENT 'id',
  `title` varchar NOT NULL COMMENT '标题',
  `sub_id` int COMMENT 'id',
  `num` int COMMENT '集数',
  `create_time` datetime COMMENT '创建时间',
  KEY `idx_saasid` (`saas_id`),
  PRIMARY KEY (`saas_id`,`create_time`)
) DISTRIBUTE BY HASH(`saas_id`) PARTITION BY VALUE(`DATE_FORMAT(create_time, '%Y%m%d')`) LIFECYCLE 14 STORAGE_POLICY='HOT' ENGINE='XUANWU' BLOCK_SIZE=8192 TABLE_PROPERTIES='{"format":"columnstore"}' COMMENT='用户观看记录';
  • 其中主键是  PRIMARY KEY (`saas_id`,`create_time`)
  • 定义了一个索引 Key `idx_saasid` (`saas_id`),
  • 根据create_time 保留 14 天数据
  • 跳数索引默认参考clickhouse 8192 
  • 分区是根据createtime 进行按每日进行分区
  • 使用AnalyticDB 是因为clickhouse 去重之后性能骤减。而且去重比较麻烦。 AnalyticDB和mysql 实例相比确实性能有不小提升
  • 不过AnalyticDB datetime 类型不能支持到毫秒 只能精确到秒