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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

PostgreSQL: How to convert 2B rows to bigint

3 点作者 cbisnett将近 5 年前

1 comment

SigmundA将近 5 年前
One thing I really wish database would focus on is online schema changes and metadata only changes.<p>I know this is not an easy problem to solve, and there are a lot of performance reason say changing a 4 byte int to an 8 byte int requires a data migration rather than just a metadata change.<p>However I think with enough thought even that could be done and still be performant. Maybe a hit as a hidden secondary column is added and data slowly migrated to it then the old column finally removed.<p>Although maybe just going to variable length number storage would be better just like strings (varchar) then min and max values are just constraints not a storage issue.