Saturday, 11 March 2017

Keeping your WordPress options table in check


When troubleshooting a slow WordPress site, an often overlooked culprit is the wp_options database table. This table houses a variety of crucial site data, including: permalinks
site settings
scheduled posts
widget data
In fact, nearly every WordPress page—from the front end to the admin screens—executes the query SELECT option_name, option_value FROM wp_options WHERE autoload = ‘yes’. If this query does not run efficiently, the results can be devastating to a site’s speed.
Why wp_options doesn’t scale
Not all WordPress database tables suffer as they grow. The wp_posts table, for instance, can be many times larger than the wp_options table without seriously impacting site performance thanks to an indexing strategy designed to accommodate very large datasets.
A database index is similar to a textbook index, which lists every mention of a term in its pages. With clearly marked page numbers, any term can be quickly found. Without this index, every page in the book would need to be flipped through to locate a specific term, every time.
If a database query doesn’t have an index on the requested field (as in our earlier example query on the options table, which
Source: https://managewp.org/articles/14566/keeping-your-wordpress-options-table-in-check




source https://williechiu40.wordpress.com/2017/03/12/keeping-your-wordpress-options-table-in-check/

No comments:

Post a Comment