Skip to content

Instantly share code, notes, and snippets.

@litzinger
Last active February 6, 2019 20:29
Show Gist options
  • Save litzinger/01d621d0f7f127fb6ca0861f3e1f8a4c to your computer and use it in GitHub Desktop.
Save litzinger/01d621d0f7f127fb6ca0861f3e1f8a4c to your computer and use it in GitHub Desktop.
DB Indexes for improved EE performance. Courtesy of @mrw
ALTER TABLE exp_channel_titles ADD INDEX sticky_order (sticky,entry_date,entry_id);
# Even if you don't use sticky, every {exp:channel:entries} tag queries on it.
ALTER TABLE exp_category_posts ADD INDEX(cat_id);
ALTER TABLE exp_files ADD INDEX file_uploads (upload_location_id,file_name);
# Lastly, make sure tables are InnoDB.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment