Opened 4 years ago
Closed 10 months ago
#9435 closed enhancement (fixed)
DB schema clean-ups
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.8 |
| Component: | Optimization | Version: | 2.8 |
| Severity: | minor | Keywords: | has-patch |
| Cc: |
Description
While looking into #9422, it occurred to me that some DB fields weren't necessarily used today. Namely:
links.link_category int(20) seems to be overridden by the terms schema.
The same goes for posts.post_category int(4).
It might be that they've been left around for obsolete plugins, though. In case this isn't the case, the attached patch, for 2.8 trunk, will remove them.
Attachments (6)
Change History (16)
Denis-de-Bernardy — 4 years ago
- Keywords needs-testing added
Denis-de-Bernardy — 4 years ago
use int(11) rather than bigint(20) unsigned, for smaller indexes (and thus faster queries)
Denis-de-Bernardy — 4 years ago
more relevant text fields: text is 65kb, mediumtext is 16MB, longtext is 4GB - an rss field stored in wp_options is only rarely larger than 65kb, and no post would ever be larger than 16MB
Denis-de-Bernardy — 4 years ago
the same patch, keeping comment_author and post_title as text fields in case this was needed for any reason
Denis-de-Bernardy — 4 years ago
drop user_status field -- see http://comox.textdrive.com/pipermail/wp-hackers/2009-January/023550.html
Is this correct?
By dropping post_category and link_category, new installs will not see those columns, but upgraded databases will still have the two columns.
- Keywords dev-feedback added; needs-testing removed
I take it the other ones are not to be used? close as fixed, or move to 2.9 for the text/varchar/int cleanups?
- Milestone changed from 2.8 to 2.9
2.9 sounds good for the type cleanups.
- Keywords dev-feedback removed
comment:10
nacin — 10 months ago
- Milestone changed from Future Release to 2.8
- Resolution set to fixed
- Status changed from new to closed

Marking as needs-testing, in case their absence has any impact I've missed by scanning the source code.