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

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
G
Google Developers Blog
Spread Privacy
Spread Privacy
I
InfoQ
V
V2EX
S
Schneier on Security
小众软件
小众软件
C
CERT Recently Published Vulnerability Notes
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Stack Overflow Blog
Stack Overflow Blog
T
Threat Research - Cisco Blogs
L
Lohrmann on Cybersecurity
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Attack and Defense Labs
Attack and Defense Labs
云风的 BLOG
云风的 BLOG
The Hacker News
The Hacker News
S
SegmentFault 最新的问题
C
Cybersecurity and Infrastructure Security Agency CISA
NISL@THU
NISL@THU
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
GbyAI
GbyAI
Latest news
Latest news
S
Secure Thoughts
Project Zero
Project Zero
MongoDB | Blog
MongoDB | Blog
I
Intezer
Security Latest
Security Latest
Apple Machine Learning Research
Apple Machine Learning Research
Vercel News
Vercel News
N
Netflix TechBlog - Medium
V2EX - 技术
V2EX - 技术
量子位
T
Threatpost
T
The Blog of Author Tim Ferriss
Y
Y Combinator Blog
T
Tor Project blog
A
Arctic Wolf
Microsoft Security Blog
Microsoft Security Blog
T
The Exploit Database - CXSecurity.com
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
C
Check Point Blog
博客园 - Franky
Google DeepMind News
Google DeepMind News
The Register - Security
The Register - Security
The GitHub Blog
The GitHub Blog
L
LINUX DO - 热门话题

SQLite

SQLite 开启 WAL 后,我的同步服务吞吐量提升了 3 倍 分享适合高并发场景的 SQLite 设置 - V2EX 在什么情况下一定要放弃 SQLite 采用 MySQL 呢? - V2EX SQLite 背后的故事 - V2EX 应该怎么理解 rowid 在 sqlite 中的使用 - V2EX macOS 上有什么好用的 SQLite GUI ? - V2EX 什么时候调用 sqlite.close()呢 - V2EX 回复“什么场景下用 SQLite”的主题并分享一个年收入 60 万刀的技术栈 - V2EX 大家有用 Sqlite 的吗,都是什么场景下要用这个,能说一两点非要用它的理由最好啦 SQLite Viewer Web App - V2EX 本地数据库 除了 SQLite 还有什么好用的. - V2EX 请教一个方案,边缘设备的 sqlite 数据如何才能获取到 - V2EX 有人知道怎么在 termux 上编译 sqlcipher 吗? 求一个数据库设计问题! - V2EX SQLite 被曝漏洞,影响范围很大 - V2EX 两个读写 SQLite 数据库的浏览器扩展 - V2EX How SQLite is tested 如果需要寫入數據, 不僅數據文件要有寫入權限, 數據文件所在的目錄也要有寫入權限 - V2EX 用sqlite3作为论坛的数据库行不行? About Sqlite 之前的一篇笔记 - V2EX 如何把一个2G的sqlite数据库分割成小的? - V2EX Base 2.0 - V2EX
SQLite In-Memory 作为数据缓存代替 Java Object - V2EX
chenliang0571 · 2022-04-07 · via SQLite

chenliang0571

V2EX  ›  SQLite

 

chenliang0571 · 2022 年 4 月 7 日 · 2243 次点击

这是一个创建于 1529 天前的主题,其中的信息可能已经有所发展或是发生改变。

背景

RESTful API 需要从数据库读取很多基础数据,这些数据改动很少,所以加了一个缓存 x 分钟刷新一次。 目前是直接保存到 Java Object 的。

问题

API 各类请求都有。基础数据方面一般都要做一些数据处理然后再组合其他数据返回。简单的比如 sort ,复杂的要先 group by 然后在筛选等。 使用 Java Stream API 能做,但是感觉有点麻烦,不如 SQL 方便。


所以想到了 SQLite In-Memory ,如果把数据保存在 SQLite 内,那么查询会直观很多,而且感觉作为 In-Memory 的数据库,速度差异应该不大?

不知道有没有 v 友有相关经验可以分享的。