[wp-trac] [WordPress Trac] #39605: Possible wp_options autoload field optimization
WordPress Trac
noreply at wordpress.org
Mon Jan 16 16:13:48 UTC 2017
#39605: Possible wp_options autoload field optimization
--------------------------------+-----------------------------
Reporter: danielkanchev | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Options, Meta APIs | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------------+-----------------------------
I have a quick question related to the wp_options table and the autoload.
Right now it is:
mysql> select distinct(autoload) from wp_options;
+----------+
| autoload |
+----------+
| no |
| yes |
+----------+
2 rows in set (0.00 sec)
If the only two possible options are ‘yes’ and ‘no’ then why is this not
simple 0 or 1. The way it is defined right now we use 20 bytes per record
only for the autoload:
| autoload | varchar(20) | NO | MUL | yes |
|
I would say that in terms of performance and memory usage I think this is
a good improvement. Any comments or there are other reasons for the
autoload to be varchar.
Also if someone has a huge wp_options table and the autoload is boolean
then the index will be much more effective.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39605>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list