TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

2 pointsby 1penny42centsover 3 years ago
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 comments

_ndianabasiover 3 years ago
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.
gerardnicoover 3 years ago
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.