Sometimes while developing a new plugin you have to do lots of database work including creating posts, editing posts, and deleting posts. All of these actions affect the post meta data table and if you aren't careful with how to manage the post meta data you'll have thousands and thousands of rows of data. By deleting orphaned post meta data (meta data belonging to posts which no longer exist) you immediately remove thousands of records that weren't doing anything.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|FROM wp_postmeta pm
|LEFT JOIN wp_posts wp ON wp.ID = pm.post_id
|WHERE wp.ID IS NULL
There are plenty of other solutions but beware that some of them might delete your entire table! Make sure you back everything up before you execute any of these.