[wp-trac] Re: [WordPress Trac] #2796: INT(4) in database
WordPress Trac
wp-trac at lists.automattic.com
Fri Jun 9 22:03:42 GMT 2006
#2796: INT(4) in database
--------------------------+-------------------------------------------------
Id: 2796 | Status: new
Component: Optimization | Modified: Fri Jun 9 22:03:42 2006
Severity: normal | Milestone:
Priority: normal | Version: 2.1
Owner: anonymous | Reporter: link92
--------------------------+-------------------------------------------------
Comment (by doit-cu):
Westi is correct. INT takes up 4 bytes no matter what number you put in
parenthesis after it. SMALLINT takes up 2 bytes. See here:
http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html.
What's odd to me is that category_id is a bigint, or 8 bytes, or
18446744073709551616 categories. Maybe some standardization should be
done across primary/foreign keys here...
I'm personally partial to INT, but that's more because 1) it's familiar
(yeah, they all do the same thing), and 2) disks are cheap.
--
Ticket URL: <http://trac.wordpress.org/ticket/2796>
WordPress Trac <http://wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list