Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I love the comment by s_ha_dum : http://wordpress.org/support/topic/sql-query-to-delete-postmeta and havent tried it yet, but Im wondering just how 'clever' this actually is?

Does the unused postmeta affect the speed of my database? Does removing the postmeta in this way affect anything else I would later regret? Is there any practical way to test this on a database with 1000's of posts and multiples of this in postmeta rows?

share|improve this question

1 Answer 1

Does the unused postmeta affect the speed of my database? Anything in your database affects the speed of your database. The question is how much of a slowdown, and if the amount of data is significant enough. Unless your having a huge amount of metadata it will not affect the speed of your database very much.

Does removing the postmeta in this way affect anything else I would later regret? Anything that uses your postmeta data will be screaming for help. Assuming your only using your postmeta to display extra information, it shouldn't be a problem. I haven't tried the code which is mentioned in your link, but the author him/her self doesn't guarantee if it works.

Is there any practical way to test this on a database with 1000's of posts and multiples of this in postmeta rows? Like the orginal poster mentioned "Test it on a development server with dummy data." If it works on a small set of data it will also work on a bigger set of data (but it will take longer).

If your looking for a way to delete postmeta for only certain post you can take a look at delete_post_meta. You can also try plugins like WP-CleanFix, WP-Optimize, and WP-CleanUp.. to optimize and clean up your database.

share|improve this answer
    
See loosely related topic: wordpress.stackexchange.com/questions/6602/…. Otto makes some good points about 'improvements' from just deleting entries from a database. Of course, you should read the rebuttals also :). –  Stephen Harris Jun 28 '12 at 15:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.