Bug #748 | support for variable length ints | ||
---|---|---|---|
Submitted: | 28 Jun 2003 13:04 | Modified: | 23 Jul 2003 13:50 |
Reporter: | Daniel Penning | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S4 (Feature request) |
Version: | OS: | ||
Assigned to: | Peter Gulutzan | CPU Architecture: | Any |
[28 Jun 2003 13:04]
Daniel Penning
[28 Jun 2003 13:11]
Daniel Penning
This might also be an efficient way to store short varchar strings.
[23 Jul 2003 13:50]
Peter Gulutzan
Users do have a bit of control over integers of variable size: TINYINT takes one byte, SMALLINT takes two bytes, INT takes four bytes, and so on. But for short items, there is an advantage in fixed-size integers, because an UPDATE of the value won't cause a size change (size changes are relatively expensive actions). On the other hand, if one doesn't intend to update, then consideration of "packed" tables is in order -- see the MySQL Reference Manual's description of myisampack for this. As for character strings, we currently have variable-length storage (with VARCHAR). So for the moment we'll consider this particular feature request "low priority" but we are going to work on various ideas for data compression, in future versions.