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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

You saved 5 cents and now your code is not readable

22 点作者 aaw超过 14 年前

2 条评论

julius_geezer超过 14 年前
Wait, MySQL stores the field names with every record? Oracle doesn't do that; Postgres doesn't do that. The documentation I can pull up with five minutes of Googling strongly suggests that InnoDB doesn't do that.<p>So as far as I know MRLCN's savings over MY_RIDICULOUSLY_LONG_COLUMN_NAME gets paid once, in the table header, whether the table has 1 row on 100 million.
评论 #1826508 未加载
wanderr超过 14 年前
Mongo technically only requires indexes to fit in memory, but in practice if your data doesn't fit in memory, performance is abysmal. We also use short names, but find that it's not terrible for readability because we use class constants representing each name, so what's the key for a playlist name? Why it's Playlist::KEY_NAME. We also have a function that renames the fields from their short mongo names to their full names when they get loaded in, so the vast majority of the time, nobody even needs to worry about the mongo key names.