I have a web server running Windows, IIS, PHP, which hosts a fully-repaired WordPress site. The database is located on a separate server inside the DMZ, which runs on Windows and MySQL 5.7.13.
When accessing a WordPress site, it takes from 6 to 16 seconds to return the first byte.
Completing this ridiculously unoptimized query from the MySQL Workbench (on a web server) takes only 0.858 seconds.
SELECT * FROM wp_posts INNER JOIN wp_postmeta ON wp_postmeta.post_id = wp_posts.ID INNER JOIN wp_comments ON wp_comments.comment_post_id = wp_posts.ID INNER JOIN wp_commentmeta ON wp_commentmeta.comment_id = wp_comments.comment_ID
This is my full my.ini file:
# Other default tuning values
source share