#3725 closed defect (bug) (wontfix)
user_id in DB much larger than needed
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | low | |
Severity: | minor | Version: | 2.2 |
Component: | Optimization | Keywords: | has-patch 2nd-opinion dev-feedback |
Focuses: | Cc: |
Description
Since the maximum # of users WordPress can support has been accepted as much much smaller than 2,147,483,647 the database schema should be modified to change all columns that reference a user ID to type INT.
Currently, all of these columns are type BIGINT, except for link_owner
in wp_links
for some reason. In addition, user IDs are type-casted to INTs in some places in the WordPress core, such as in get_userdata
.
The attached patch changes all of the columns referencing user IDs to INTs and bumps wp_db_version
.
Attachments (1)
Change History (12)
#5
@
18 years ago
The reason this (and several other fields) are set to be extra large in the DB because when you get to the point where you need to change it to be larger, it will be a very long (possibly days) operation with locked tables. There is no real cost to using the bigger fields, so in the hope that WP may someday be successful enough to need it I propose we leave the big fields in. (In the users table, and everywhere else.)
#6
@
18 years ago
- Keywords 2nd-opinion added
Fair point. Perhaps the size of wp_links.link_owner
should be increased then, for this same reason -- it's currently set to INT(11), unlike anywhere else.
Reduces user ID size in DB and bumps wp_db_version