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.

You saved 5 cents and now your code is not readable

22 pointsby aawover 14 years ago

2 comments

julius_geezerover 14 years ago
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 未加载
wanderrover 14 years ago
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.