0

We've stuck with the following problem:

The query takes about 0.5 seconds to run on mysql 5.7.* and it takes about 3 minutes to the same query on mysql 5.6.*.

The database is exactly the same database, computers are with same RAM, disk, processors, etc.

Checked on 8 different computers with different mysql versions. What can be the problem?

The query is making join of two tables from two different databases and then updates one of them.

Checked the documentation, searched for some information in Google. Can't find anything that can help me. I think it is something in configuration that changed between these releases.

Thank you for your help friends :)

  • Can you refer this https://stackoverflow.com/questions/17931246/slow-query-after-upgrade-mysql-from-5-5-to-5-6 ? – Wit Wikky Nov 01 '18 at 13:29
  • 1
    You need to show a MCVE... Otherwise no help can be provided effectively – Javier Larroulet Nov 01 '18 at 13:33
  • I think we all can *generally* agree that when a software is upgraded, it is made more efficient. So, there must be some optimizations done in 5.7 which were not there in 5.6 and made your query faster. You should really consider upgrading your MySQL version to latest. I would even recommend to take one more jump and upgrade to MySQL 8.0 and enjoy awesome new features like CTE, Window functions, and query optimization (offcourse) :-) – Madhur Bhaiya Nov 01 '18 at 13:46
  • thank you all for your responses. I've found and fixed the issue. Mysql 5.7 and 5.6 used 100% different inner optimization for one of queries in my script. So, I found the query, rewritten it and now it flights both on 5.7 and 5.6. – Michael Nurmukhamedov Nov 04 '18 at 07:57

0 Answers0