Database tables don’t really get “full”. They can handle a lot of rows without problems. Inserts are typically only slow because of something else. I would start exploring what else might be going on such as other plugins executing when you save a post. For example, some plugins may attempt to automatically share a new post to other sites or ping servers about the update. These could slow things down.
Also determine if the problem occurs when you create a new draft or only when you publish.
Thread Starter
hh2015
(@hh2015)
Thank you. The size of sql file is over 550,000KB. Isn’t this too big for a DB :-)? I couldn’t insert any new info into the table. Can I save the data into 2 tables (ie. wp_post1 and wp_post2)? or can I save data into 2 databases? I deactivated all plugins it was still very slow. Please help
That is a large database. I’d still rule out other problems before doing something like splitting a database (I don’t even know if that’s possible).
Do you know for certain that the wp_posts is the biggest table? There may be others that are making the database large.
If it is the wp_posts table, do you have revisions turned on? Do you need that feature? If not, turn them off and get one of the plugins that removes revisions from the database.
Thread Starter
hh2015
(@hh2015)
Good point, thank you. Actually the biggest table is wp-postmeta (337MB). I do have a WP-Optimize plugin. There is no old revisions. Any other ideas? why data can’t be stored in other table or other database? I think if I specify the table (or db) for insert and tables (or dbs) for select from, it should work. Do you know which php files contain “insert” and “select” command :-)? Thanks.
I would look into why the wp_postmeta table is so big. Do you have a lot of posts/pages? Is there a particular meta_key/meta_value pair that is being inserted repeatedly or that has a large value?
I don’t think that trying to modify how WordPress works so that you can insert into and select from multiple tables is a small task. I also don’t see how writing to multiple tables will fix anything since you still have to execute queries to scan existing data when selecting and check for integrity when inserting.