WooCommerce is one of the most commonly used plugins to add e-commerce features to a site. One of the most regular issues that WooCommerce can cause to a site in terms of performance in the site’s database is related to transients.
If you are using the geolocation feature to work out the customer’s default location which uses the MaxMind API then those transients can cause a lot of bloat.
You can check if you have that setting enabled in WooCommerce from wp-admin go to;
WooCommerce > Settings > General
Currently, the geolocate transients are stored for a week which means if you have a normal level of customers on the site then over time you could end up with 20k to 40k transients all related to the geolocate feature in WooCommerce.
You can delete those transient types by using phpMyAdmin or a similar database manager by searching for the following option names from the options database table;
Until the geolocate transients are changed in WooCommerce core to expire after two hours or even daily it is not recommended to use the geolocate feature in WooCommerce due the performance issues it can cause.
Once you find those transients then you can delete all of those that are found for some performance gains.
If you need to delete all of the transients in a site database then you can search for the following option name;
You can easily delete WooCommerce expired transients and all WooCommerce related transients in WooCommerce from;
WooCommerce > Status > Tools
Keeping transients created by WooCommerce under control will help improve your wp-admin load times as well as helping your site’s database performance.