Skip to content

Instantly share code, notes, and snippets.

@tuongpgjz
Created December 31, 2021 07:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuongpgjz/17cbf718602f1e349466dece96cf04bb to your computer and use it in GitHub Desktop.
Save tuongpgjz/17cbf718602f1e349466dece96cf04bb to your computer and use it in GitHub Desktop.
Optimize postmeta table for big data on WordPress
ALTER TABLE wp_postmeta ADD key(post_id, meta_key(100), meta_value(191));
ALTER TABLE wp_postmeta ADD key(meta_key(100), meta_value(191));
-- change wp_postmeta to your table with prefix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment