Hello, dear Ollie Jones!
I am very inspired by your plugin and in fact you are my last hope to speed up the opening time of pages on my site.
Tell me, please. I have several sites on a dedicated server. How can I use WP-Cli to create indexes for tables in only one database, and not for all sites?
The site for which I want to create keys contains more than 300 thousand news and articles, there are more than 3.7 million rows in the wp_postmeta table, and more than 2.1 million rows in the wp_litespeed_avatar tab. I understand that through the admin panel of the plugin, it is very long and dangerous to do this.
Does it make sense to make indexes for the wp_litespeed_avatar table at all? To be honest, I don’t understand at all why LiteSpeed saved so many links to gravatars from me. )
]]>Hi,
I use mydumper / myloader to transfer the db extremely fast between staging dev and production. Now wp_options and wp_postmeta are huge, so even with multi-threading on, in the end it takes forever for the last two threads to finish building these two tables when the dump cannot be split.
But splitting in mydumper is only available with a numeric primary key.
Now I manually changed the primary key back to the original one for these two tables (kept the old primary as unique key), and indeed the dumping and loading works way faster now.
Could you elaborate on what is the penalty here? what kind of queries will be slower, and on what order of magnitude?
Thank you!
Hello there,
I have added a custom index to the wp_comments
table that is specific to the site custom functionality. It improves the speed of the query (that runs quite often) from ~4s to ~100ms. So it’s substantial.
Now, every plugin update rewrites them effectively dropping my custom index. Not good.
I do want to add your indices but also keep mine without the need to re-add it every single time.
Can your plugin instead of dropping all indices – drop only own indices (by name) and recreate them? This way custom one will be left as is.
Thank you.
]]>Hi!
I’ve migrated a webshop, that is having 2.3GB size of data in mysql. Added Redis Object cache and opcache and using this plug-in. But the CPU usage is quite a lot (90-100% of the 4 cores). I’ve uploaded a monitor under ID “DQT4mzYb”.
Can someone have a look if one might see improvements on my end? buffer pool is set to 5GB, which uses 3GB currently. It’s a server with 4 vCPU cores and 16GB memory, Hosted at DigitalOcean.
Sorry for the bad title but I couldn’t get better. For some reason the plugin says about woocommerce_order_itemmeta table: “These tables have keys set some way other than this plugin. You can convert those tables to this plugin’s latest high-performance keys or revert them to WordPress’s standard keys.” And the meta table is listed in both sections, revert and convert. This made me cautious not to run it yet.
]]>This stuff is way over my head, but I just wanted to make sure I can use this plugin with Redis and there will be no issues? I just recently learned that Woocommerce doesn’t employ object caching, which was kind of a surprise. Looking to use it on some Woo sites that also do use Redis. I’ve used it on some that don’t and it’s pretty amazing.
Hello OllieJones,
I noticed from your profile that you are a core contributor, and although I haven’t verified further, it has raised some questions for me.
I have been aware of this WordPress issue for years, and I only recently started using your plugin on a very critical large-scale store.
My first question is about the future updates: What would happen if an update breaks the functionality provided by your plugin? I understand that the WordPress schema is not supposed to change and that the development cycle is open source and predictable, but I’m looking for some reassurance. There’s little risk, right? And you’ll be there to update the plugin if needed, won’t you? ??
Secondly, why wasn’t this integrated directly into the core of WordPress? Given that WordPress powers a significant portion of the web, a simple modification like this could arguably benefit the planet more than individual efforts by prominent activists. It would save a lot of CPU time and human effort. So, why hasn’t such a straightforward enhancement been integrated into the core? It reminds me of the situation with WooCommerce HPOS—glad to see continuous improvement, but it seems we are still far from what could be achieved.
Lastly, off-topic, I noticed the translation for the plugin seems to be in order, and it appears correct. I could validate it as I have been translating since my teenage years, though I need to familiarize myself with the WP translation platform. I have experience with Notepad++, Weblate, and Crowdin.
Thank you for your insights and looking forward to your feedback!
Best regards,
Maxime Michaud
]]>Hello, super plugin! Finally something to repair unindexed tables. After applying it, can I deactivate or he make changes back?
]]>do I need to leave the plugin installed or can I remove it once its done its work ?
]]>Each click in wp-admin area, I need to wait 10+ seconds. Can you check the upload 958btwCz, see if I can do anything for improving, please?
Thank you.
I’m trying to speed up slow queries from the update_meta_cache function in WP which sorts postmeta post id looks up by the meta_id column, as below:
SELECT post_id, meta_key, meta_value
FROM wp_postmeta
WHERE post_id IN (100,….)
ORDER BY meta_id ASC;
Adding the indexes in this plugin seems to add an additional 90ms on large look ups (when requesting hundreds of IDs) than the standard indexes.
Do you have any suggestions on potential indexes that could be added to speed up sorting by meta_id? I’m guessing because the meta_id isn’t in the original select, it results in an extra order by filesort which is much slower?
I have uploaded from about. ID 3r2Asc9q
There is the suggestion to convert keys. When I do error comes Duplicate key name ‘meta_value’
]]>hello, thanks for the plugin. It is really great.
I have installed it on:
WordPress multisite + WooCommerce + MultilingualPress and the posts and postsmeta tables have fattened a lot, going the total table from 8gb to 21gb.
I have uploaded the LJVABNJy report, could you take a look at it and see if you can recommend something?
I just talked to the server people to try to expand the innodb pool buffer size, currently it is 4gb, I don’t know if I can expand it a bit.
Since I put the keys in we have been getting some sporadic 502 errors and we think it is due to the size of the database.
Thanks.
]]>You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘Value Index, DROP KEY post_id/**imfs-query-tag*137060258*/’ at line 1
]]>I was trying to add keys thru the GUI in the wordpress but it keeps timeout due to the number of posts, so I try to enable it from the cPanel terminal with the command wp index-mysql enable G03_postmeta but it shows critical error. I suspect this is because of the previous run I did from the plugins GUI add keys button (but failed)
How to recover from this? I hope I don’t have to restore from backup for this because some new contents had gone into the site, and I hope there is another solution other than restoring from backups.
The output from the command recommend to alter the table, but I don’t quite understand how to do it and I think the output from the command is not a complete statement, maybe it’s too long that why it’s only showing partial.
]]>Hi,
I run a ‘Find a lawyer’ type of website made with Bricks, ACF Pro and WP GridBuilder for filtering.
I have around 15,000 lawyers (posts) – each has it’s own page, and there is a global page where user can filter lawyers based on city, law specialization, etc. (taxonomies) with WP GridBuilder facets.
It’s working okay-ish, but I’m looking for a ways of improving it. I’m not much of a backend guy, and I found a couple of competition plugins for ACF that store it’s data in custom tables instead of a long wp_postmeta – Pods, or MetaBox (https://metabox.io/move-custom-fields-data-to-custom-tables/) towards which I’m leaning into.
But if it’ll be in a custom table, then I guess your plugin won’t optimize it’s queries.
So my question is… Do you have any idea which route would be better? Default storing of data without custom tables & your plugin, or custom tables? Is there a way for me to measure the effects of both approaches that you’re aware of?
Any help would be appreciated, thanks!
Hello everyone,
After I installed the plugin I got an error and my website does not working correctly.
“Unable to read published form data (Lost connection to MySQL server during query)” I saw that error on some pages. How can I fix it?
]]>Hello
Recently my site started to use too much CPU. I tried to optimize with several plugins and nothing improved. A forum user recommended me this plugin but I don’t know what to optimize. Is there any way to share with you some screenshot or data to guide me? Of course before I will make a backup and test it on my local server (Xampp).
Regards,
Juan
]]>I work for a store that uses a heavily customized WooCommerce site for in-store sales: The site runs on a private intranet (hence no link available, sorry) and is responsible for entering orders, taking payments via a separate Poynt cardreader, and then saving data for our in-house inventory database. It’s been in operation for four years and has around 180,000 orders in it.
Of late, the system has been slowing down drastically, and some larger queries seem to be failing completely. Nothing has been changed recently in the code that might affect these queries, so I think I’m looking at a database-speed issue. (wp_posts is just under 100MB, while wp_postmeta is at 2.1GB and climbing.) I’d like to try this plugin and see if it helps with these issues, but first I need to know: does this plug-in do anything that might mess up the customized plug-ins we use with the site?
]]>I’m fairly new to this but I’m trying and learning. I’ve worked on cleaning up the data base but its still slow. Could you take a look at my results and let me know if anything stands out to you?
Here is my upload ID: XNgGsrnQ
Hello, I had installed the plugin and noticed that the database got twice the size after converting some tables in InnoDB.
Is this a normal behaviour? The database was already big (2.4GB) and now is 4GB.
I’m tending to set up object cache in the near future.
Site monitored metadata was uploaded and its id is 3jpDBk92.
Τhank you for the great plugin, the site loads faster regardless of whether the database grew.
Can you help to check the monitor ID JRVkuvMJ, please? I am trying to find out why the backend is quite slow. Thank you.
]]>Hi, we are trying to optimize a client’s website but ran into some problems when optimizing the wp_postmeta table. Interestingly it worked on the staging site which had a fairly recent sync with production.
This the error. Hope you can give some insights how to fix this.
]]>WordPress database error Index for table 'wp_postmeta' is corrupt; try to repair it for query ALTER TABLE
wp_postmeta
ADD UNIQUE KEY meta_id (meta_id), DROP PRIMARY KEY, ADD PRIMARY KEY (post_id, meta_key, meta_id), DROP KEY meta_key, ADD KEY meta_key (meta_key, meta_value(32), post_id, meta_id), ADD KEY meta_value (meta_value(32), meta_id), DROP KEY post_id/**imfs-query-tag*935363677*/ made by include('phar:///usr/local/bin/wp/php/boot-phar.php'), include('phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php'), WP_CLI\bootstrap, WP_CLI\Bootstrap\LaunchRunner->process, WP_CLI\Runner->start, WP_CLI\Runner->run_command_and_exit, WP_CLI\Runner->run_command, WP_CLI\Dispatcher\Subcommand->invoke, call_user_func, WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}, call_user_func, ImsfCli->enable, ImsfCli->doRekeying, ImfsDb->rekeyTables, ImfsDb->rekeyTable, ImfsDb->query
PHP Fatal error: Uncaught ImfsException: [0]: Index for table 'wp_postmeta' is corrupt; try to repair it in ALTER TABLEwp_postmeta
ADD UNIQUE KEY meta_id (meta_id), DROP PRIMARY KEY, ADD PRIMARY KEY (post_id, meta_key, meta_id), DROP KEY meta_key, ADD KEY meta_key (meta_key, meta_value(32), post_id, meta_id), ADD KEY meta_value (meta_value(32), meta_id), DROP KEY post_id/**imfs-query-tag*935363677*/
thrown in /var/www/site/prod-v2/releases/12/web/app/plugins/index-wp-mysql-for-speed/code/imsfdb.php on line 477
Fatal error: Uncaught ImfsException: [0]: Index for table 'wp_postmeta' is corrupt; try to repair it in ALTER TABLEwp_postmeta
ADD UNIQUE KEY meta_id (meta_id), DROP PRIMARY KEY, ADD PRIMARY KEY (post_id, meta_key, meta_id), DROP KEY meta_key, ADD KEY meta_key (meta_key, meta_value(32), post_id, meta_id), ADD KEY meta_value (meta_value(32), meta_id), DROP KEY post_id/**imfs-query-tag*935363677*/
thrown in /var/www/site/prod-v2/releases/12/web/app/plugins/index-wp-mysql-for-speed/code/imsfdb.php on line 477
Hello, I had installed index wp mysql and index user plugins and it went well. Performance of admin dashboard usage became pretty fast. But memory usage became increase (usual 40-45% of 4gb ram to 85%). Most memory usage is due to redis object cache. At 85% memory usage, I have to disable redis cache and reconnect. After cleaning up redis object cache, server memory went down to 35%. After that it increased slowly again upto 85% during about 24hours.
Also, my database buffer pool size is only 125mb and database size is 3Gb. Should I increase buffer pool size or change redis configuration? Please help advice me!
Site monitored metadata was uploaded and its id is KCQjeqMM. Thank for this awesome plugin.
]]>Hello,
I added keys with no issue however for some reason page load time is still extremely slow :\ the problem is not new it been like that for months.
Database in our site is big (not huge though). especially the following tables:
wp_postmeta (786,104 rows), wp_posts (138,173 rows)
I’ve done the monitoring process (Upload ID= 73XKTBaY) and I could see right away that some tables are taking more time than it suppose to. However, don’t really know if there is anything I could do about it. Are you able to check the table ID and see if something ring a bell?
We’re on dedicated server. Server load is mostly too low so we’re not exhausting our resources. We do have active cache plugin (LiteSpeed) with MemCached object cache enabled, CloudFlare CDN is enabled as well. Running latest versions of: PHP 8.1, WordPress, Theme. And finally I’ve already repaired/optimized our Database.
Any help is appreciated.
]]>Hello, your plugin really caught my attention and I appreciate your work. Recently I was researching sharding methods for wordpress database and noticed this plugin for better performance.
Is this plugin suitable for WordPress multisite? When a subsite is created in the network, 50 tables are created and when we use this plugin, the amount of tables will be doubled? Can I get better performance with this plugin?
I’m really wondering how the performance and storage works as the number of tables increases.
]]>Hi, I tried enabling via WP-CLI, but get this message:
$ wp index-mysql enable wp_postmeta
Index WP MySQL For Speed 1.4.18
Versions Plugin:1.4.18 MySQL:10.6.16-MariaDB WordPress:6.5.3 WordPress database:57155 php:7.4.33
These tables are not found or not eligible to enable: wp_postmeta.
No tables are eligible to enable.
Metadata uploaded to id yzuZQDUQ
.
I’m using a different database table prefix, but I guess that shouldn’t be the problem.
]]>Hello Ollie, I am planning to implement your plugin to a woocommerce website with more than 25000 products. The main reason is to speed up the woo administration dashboard, as the frontend works fine already.
I would like to know what the steps to revert are (just in case sth goes wrong with the implementation). I understand that restoring the backed up sql database and deleting the plugin folder should be enough. Is that right? The steps I am planning to take are:
1. Create a duplicate of my original database (I will create a second database and import my current database there before installing your plugin)
2. Change wp-config.php settings to point to the new duplicate database.
3. Install and test your plugin.
4. Hopefully, see a speed increase ?? and do nothing more. But just in case, the website crashes for some reason, delete the plugin folder (I have root access via Cpanel) and change my wp-config settings to point to the original database.
Is there anything more I should do?
Some more questions:
I am also planning to implement object caching. Is it better to do it before or after installing your plugin?
How long can it take for the keys generation to complete? My database is 600MB with ~1million wp_postmeta. I mean, will it be minutes or it can be hours?
Looking forward to your feedback and many thanks in advance for your time!
]]>UPLOAD ID: vbEjLTu2
Hello, a few months ago I started experiencing slowness when editing registrations and products and orders.
It was chaos, I did everything and NOTHING solved it, that’s when I found your plugin and by a stroke of “magic” everything started working again quickly, wonderful!
HOWEVER, I left Woo running on version 8.7.0 for a long time, and yesterday, I decided to update to version 8.8.3 and due to my SADNESS, now, I CANNOT EVEN open an order.
I tried to optimize the DB, returned the keys through your plugin to the default keys, applied the improvements again and NOTHING changed.
I even opened support in Woo and thought 2 things:
1- Or Woo did something about it that your plugin no longer works in this version.
2- Or perhaps you would need some update to your plugin to make it functional and compatible with Woo 8.8.3.
Do you think it would be possible to help me?
Now I’m probably going to roll back the Woo version to 8.7.0 to see if this can be resolved.
My client will go crazy if he tests and is unable to open the orders, I tried, and the server gets an error, sad =/
If you can help, I would be very grateful.
Because your plugin is incredible and saved me.
]]>Hi.
I have 2 questions, can you please help?
Thank you.
]]>