I have a Magento 1.9.2.1 . And it successfully running on Apache2 and MySQL 5.5.
I have tried to migrate it to another server and used NGINX and MySQL 5.7 for it.
But website started to be very slow (12 seconds against 2). After several hours of debug I have found that there is a problem in one query:
SELECT
`main_table`.`entity_id`,
`main_table`.`name`,
`main_table`.`path`,
`main_table`.`is_active`,
`main_table`.`is_anchor`,
`url_rewrite`.`request_path`
FROM
`catalog_category_flat_store_1` AS `main_table`
LEFT JOIN
`core_url_rewrite` AS `url_rewrite` ON
`url_rewrite`.`category_id` = `main_table`.`entity_id` AND
`url_rewrite`.`is_system` = 1 AND
`url_rewrite`.`store_id` = 1 AND
`url_rewrite`.`id_path` LIKE 'category/%'
WHERE
(`main_table`.`include_in_menu` = '1') AND
(`main_table`.`is_active` = '1') AND
(`main_table`.`path` like '1/2/%')
ORDER BY
`main_table`.`position` ASC;
And on explain I have found that there is no index used. On the old MySQL 5.5 server explain command showing index in use. Once I force usage of index - new server answers in 0.01s instead of 10s. But I think that it is not good idea to change sourcefiles of magento code.
Is there a way to force MySQL 5.7 work in similar way as 5.5 in index choosing?.
Sadly only MySQL downgrade from 5.7 to 5.5 fixed similar issue for me. Magento sql query have no index
Just for anyone else searching this like I was today, there's a simple fix you can apply to app/code/core/Mage/Catalog/Helper/Category/Url/rewrite.php details here - https://github.com/hvanmegen/magento-mysql-5.7-join-fix