When I create an attribute column with "MEDTEXT" does mySql Reserve 16 chars each row
When I create an attribute column with "MEDTEXT" does mySql Reserve 16 chars for each row?
I am making an "account system" and I have Meta data that can be associated with users.
Some meta data is 1 or 0. But sometimes it can be a lengthy description for the user.
That's a lot of space to reserve for parts of the table that don't need it.
Thank you for the help.
Depends on how you specify the column.
If you do
However, if you use
NOTE: This is not quite true. VARCHAR, because it does use a variable amount of space, incurs OVERHEAD in the form of a hidden length value that remembers how much data is stored. So if you only need to store, say, up to 4 characters, it will be more efficient to use CHAR(4). But a caution: CHAR() of any size *PADS* your text with SPACES up to the given size.
In general, CHAR() is much much less often used than VARCHAR().
N.B.: The above applies pretty much unchanged to all relational databases: MySQL, SQL Server, Oracle, etc.
Wow. That was jam packed. Thanks!
I have moved away from meta-data though because what I'm providing is better to be manually configured on that level than some API.
This information is still very useful though, thank you.
I don't know how you can "move away from metadata." Virtually any system, and especially any software system, has metadata, either explicitly declared and created or at the least implied by its very structure.
Even your manual configuration implies that there is metadata involved. In your head, if no place else.
|All times are GMT +1. The time now is 11:13 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.