TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: What RDBMS optimizations can we do for append-only tables?

2 点作者 1penny42cents超过 3 年前
Let&#x27;s say we have a table which saves immutable events. This table does not support any UPDATE statements, just INSERT and SELECT.<p>I can imagine that there are some optimizations we can make for such tables, since there will never be a case where a row is being updated while another query reads it. Is there a looser transaction isolation we can set? Are there any other optimizations we can do?<p>I understand that the optimizations may depend on the specific database. In that case, I would suggest focusing on Postgres and&#x2F;or MySQL as they are the most common in my experience.

2 条评论

_ndianabasi超过 3 年前
One of the optimisations which can be performed on such a table is indexing on single and multiple columns so that retrievals can be faster. Since there are no updates, the performance impact of re-indexing after updates is miminised.
gerardnico超过 3 年前
If there is no index, no key, no trigger, and that you have a low isolation level such as `Read uncommitted`, I really don&#x27;t see what the database could do more than an insert.