InnoDB vs. MyISAM for a large Wordpress blog table

Hi.
I know this issue has been discussed so many times. But I have a specific question with a large table on a WordPress blog.
I have about 50 thousand messages with more than 100-page tag. When performing a search, a lot of memory and processor resources are required.
I am currently using MyISAM for wp_posts and wp_posts_meta.
So I would like to know your opinion, should I change it to InnoDB?

The WordPress blog host on my vps with 2 GB of RAM and a 4-core processor using CentOS 5. And I tried to optimize the MySQL configuration and use the database caching plugin.

So will InnoDB solve my problem? And please forgive me if asked earlier. I just want to know your opinion.

thank

Ivan

+3
source share
3 answers

Removing changes in mail messages and pages will significantly reduce the size of the WP database - up to 90% in some cases - with a huge return in speed.

Run as a SQL query in phpmyadmin to remove changes; if necessary, change the table prefix:

DELETE a,b,c FROM wp_posts a LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id) LEFT JOIN wp_postmeta c ON (a.ID = c.post_id) WHERE a.post_type = 'revision'

Then optimize all the tables. And then add

define ('WP_POST_REVISIONS', FALSE);

at the top of wp-config.php to disable future versions.

+3
source

EXPLAIN SELECT, . , . ? SQL ?

, MyISAM . MyISAM , . innoDB .

+2

The type of switch table will not speed up the search. InnoDB will only help if you have problems with blocking. Since the data on the blog does not change much, it is very unlikely that you have problems with blocking. The problem seems to be in full-text search. I would look at a plugin that will add a full text index and use that index to search.

+2
source

Source: https://habr.com/ru/post/1794634/


All Articles