Opened 4 years ago
Last modified 3 weeks ago
#8924 reopened enhancement
autoload should be boolean in add_option(), indexed in DB
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | lowest | Milestone: | Awaiting Review |
| Component: | Optimization | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | kenton.jacobsen@… |
Description
Regarding: CREATE TABLE wp_options (autoload varchar(20) NOT NULL DEFAULT 'yes',
Why not boolean binary, or one character long?
Change History (10)
comment:1
jacobsantos — 4 years ago
- Severity changed from trivial to major
- Milestone 2.8 deleted
- Resolution set to wontfix
- Status changed from new to closed
We're stuck with it, alas.
Bringing this back up for debate.
Even if we can't make it a boolean or int or something, is there any reason it has no index on it? With options tables inflating due to storage of things like transients and caches, this might be worth indexing.
- Resolution wontfix deleted
- Status changed from closed to reopened
I meant to convert add_option() to accept a boolean in #10788, but didn't.
There's little reason to change the storage mechanism, but... I completely forgot it wasn't indexed. Could also consider making it varchar(3).
comment:5
SergeyBiryukov — 21 months ago
- Milestone set to Awaiting Review
- Summary changed from autoload should be boolean to autoload should be boolean in add_option(), indexed in DB
add_option() should accept a boolean. But the DB doesn't need to change (no index, either) — see pento's comment in #14258.
comment:10
brokentone — 3 weeks ago
- Cc kenton.jacobsen@… added

This is not a trivial change.