- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Ha
Admin
No, VARCHAR are always stored in the row (contributing to the 65535 maximum record length in MySQL, even after 5.0.3) while TEXT fields are stored elsewhere.
MSSQL also has VARCHAR(max) which appears to allocate 8k in the record and uses that if the text fits, otherwise it stores it elsewhere.
It's unlikely there are enough records to justify the time it would have taken to set the column width correctly.
Admin
64 bit computing really opened up one of the main areas we were having a lot of problem with even in the early 2000s: RAM and reading from disk.
Having the 4GB limit of RAM removed meant that now DBAs too can get lazy like developers when writing highly efficient code. We used to spend a lot of time optimizing by getting every last megabyte of data we need in memory, and trying to keep all others away with swords and spikes. However, that was impossible, so we had to come up with ways of maximizing spinning disks.
Now with FusionIO cards, and 64 GB of ram standard on many machines, we don't care about normalization as much as we did. Licensed products also seem to charge per CPU, so removing joins and maximizing CPU time by offloading it to memory is a legitimate tactic.
It's also helped a lot in parallel computing using products like Hadoop, but that's for the nuances of the map-reduce-sort jobs.
Admin
Admin
Admin
Whoosh.
Admin
It might be a self-documenting clue as to the strings format if it is limited to the expected maximum length. Also, it would reject an attempted update with data that is too long to be a valid value. The only benefit is to accommodate a future change to allow "hitherto unknown precisions", though it shouldn't be too painful to just change the length in the event of such an unlikely requirement.