WordPress 6.1 Contains “Massive Improvement To Database Performance”

WordPress 6.1 Contains “Massive Improvement To Database Performance”

WordPress 6.1 includes an enhancement that will significantly improve performance by caching database queries.

WordPress 6.1 The release is scheduled for November in 2022. It will include the “massive improvement in your database performance” because of new query caching for posts.

This feature is expected to help WordPress websites work better and faster.

The caching enhancement is specific due to the caching of post queries.

In the announcement thread on Twitter, the user asked if the improvement was already available with version 6.0.

Huge Improvement

As a WordPress principal contributor who was involved in this project, the caching feature is expected to bring about a significant improvement.

The primary participant tweeted this:

“In WordPress 6.1, there is an enormous improvement in the performance of databases.

Database queries from WP_Query are now being cached. A task I’ve been working on for five-plus years was finally merged.

This could result in billions of fewer database queries.”

A draft note was also created, which contained more details on the cache:

“WordPress 6.1 includes an improvement to the way that database queries are handled within the ‘WP_Query’ class to ensure that the results of queries to databases will be cached in the object cache.

WordPress 6.1 Contains “Massive Improvement To Database Performance”

The result is loaded into the cache if the same database query is executed multiple times.

If you are employing persistent caches, that would mean that, until caches are wiped out, the database query won’t be repeated, resulting in a decrease of database queries.”

They were asked:

“Thanks! Didn’t you see an improvement in 6.0?

We also encountered significant issues with big Woo stores, such as categories disappearing on archives pages when only child-related types are examined, not the highest of the line (parent) category.

Are you interested in the note with more details”

WordPress Core Committer Responded: WordPress Core Committer has responded:

“We are constantly improving the performance of databases every day.

It was upgraded to the concept of query caching with 6.0. This is called post-query caching. Similar, but not exactly identical.

This issue was fixed in 6.0.1. I patched the issue myself.”

WordPress Database and Queries

WordPress is a database that stores different parts of the site in an online database.

The database is a collection of details about the website organized into tables.

For instance, all the contents of web pages are stored in tables.

When a user visits a page, WordPress will “query” the database to search for and locate the information for the page in the database.

WordPress creates multiple database queries for each requested page for each website user.

This can result in an enormous burden on servers when it occurs many times per minute. This results in slower database performance, slowing down the entire website.

With this latest database cache feature, instead of creating a database query, it will first verify whether what it’s searching for is stored in a cache and then pull the data from the cache.

It’s like taking orders for lunch; instead of waiting for lunch to be served, the person taking charge goes to the counter and makes it immediately.

Answer to WordPress Community WordPress Community

The announcement, which was not official, was well received.

Late-Night Issues to be Corrected

Despite the latest tweet that announced the feature’s inclusion added to the following WordPress release, a questionable issue was discovered that raised doubts about whether the quality will make it into the next WordPress release.

The project’s GitHub tickets to the cache-related project have been closed. This means that the bugs appeared to be resolved, and the project was complete.

Then, hours later, the WordPress contributor reopened the ticket due to new issues.

The issue that was identified was related to the persistent object cache.

They created an explanation for it:

“Reopening because I’ve found a few problems with persistent object Caching. Issue 1 – Cache Add is frequently called whenever persistent Object Caching is turned on. This is due to update_post_caches being called. This function shouldn’t be invoked if the object cache is turned on.

 Issue 2: Cache set is invoked every WP_Query operation, not just one.”

A brand new GitHub Pull Release was released to provide the solution to the recently discovered problems.

Confirmed the Database Cache will be In WordPress 6.1

I contacted the developer through a direct message via Twitter, and he said there wouldn’t be a delay.

He also confirmed that there is a six-week window left, the newly discovered issues will be addressed, and the technology for caching will soon be added with WordPress 6.1.

Current Status

Then, a few days later, the GitHub update of the feature was updated to indicate that the issue was solved.

The comment stated:

“Query Refrain from storing excessive cache adds and sets in WP_Query.

 In [53941], the database query caching is now part of WP_Query. On sites that have persistent object cache enabled, it resulted in an excessive number of cache set-ups and additional requests to the load on each request. Caches aren’t set if the query cache exists and has been cached. Replace update_post_caches’ usage with the _prime_post_caches so that only posts not cached are primed.”

Following that, the primary contributor made the following comment::

Resolution fixed to fix

The status changed from closed to reopened

It’s not been announced officially yet, but that’s normal. Every release has hundreds of enhancements, and the most important ones are typically reported on the day of the release.

The new feature will enhance WordPress performance. It will be released in version 6.1, which is scheduled to launch in November 2022.

Leave a Reply

Your email address will not be published. Required fields are marked *