New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FORCE INDEX to workaround bug in MySQL #8563

Merged
merged 1 commit into from Dec 13, 2017

Conversation

Projects
None yet
6 participants
@jocel1
Contributor

jocel1 commented Nov 29, 2017

Questions Answers
Branch? develop
Description? workaround a mysql bug which could cause performance issue on search queries (see https://bugs.mysql.com/bug.php?id=88671)
Type? improvement
Category? FO
BC breaks? no
Deprecations? no
How to test? Run a search query

Important guidelines


This change is Reviewable

@jocel1

This comment has been minimized.

Show comment
Hide comment
@jocel1

jocel1 Nov 29, 2017

Contributor

Replace PR #8534

Contributor

jocel1 commented Nov 29, 2017

Replace PR #8534

@jocel1 jocel1 requested a review from Quetzacoalt91 Nov 29, 2017

@jocel1 jocel1 self-assigned this Nov 29, 2017

@codacy-bot

This comment has been minimized.

Show comment
Hide comment
@codacy-bot

codacy-bot Nov 29, 2017

Codacy Here is an overview of what got changed by this pull request:

Complexity decreasing per file
==============================
+ classes/Search.php  -104
         

See the complete overview on Codacy

codacy-bot commented Nov 29, 2017

Codacy Here is an overview of what got changed by this pull request:

Complexity decreasing per file
==============================
+ classes/Search.php  -104
         

See the complete overview on Codacy

LEFT JOIN `'._DB_PREFIX_.'image_shop` image_shop
LEFT JOIN `'._DB_PREFIX_.'manufacturer` m FORCE INDEX (PRIMARY)
ON m.`id_manufacturer` = p.`id_manufacturer`
LEFT JOIN `'._DB_PREFIX_.'image_shop` image_shop FORCE INDEX (id_product)

This comment has been minimized.

@Quetzacoalt91

Quetzacoalt91 Nov 30, 2017

Member

These two others FORCE INDEX weren't obvious enough for MySQL?

@Quetzacoalt91

Quetzacoalt91 Nov 30, 2017

Member

These two others FORCE INDEX weren't obvious enough for MySQL?

This comment has been minimized.

@jocel1

jocel1 Nov 30, 2017

Contributor

I saw 1 cases where MySQL was also messing up with manufacturer. Since it speeds up a bit the computing of the execution plan, there's no harm adding those extra FORCE INDEX :)

@jocel1

jocel1 Nov 30, 2017

Contributor

I saw 1 cases where MySQL was also messing up with manufacturer. Since it speeds up a bit the computing of the execution plan, there's no harm adding those extra FORCE INDEX :)

This comment has been minimized.

@Quetzacoalt91

Quetzacoalt91 Nov 30, 2017

Member

Yep, but I had to ask :)

@Quetzacoalt91

Quetzacoalt91 Nov 30, 2017

Member

Yep, but I had to ask :)

@jocel1

This comment has been minimized.

Show comment
Hide comment
@jocel1

jocel1 Dec 5, 2017

Contributor

Bug confirmed on MySQL side

Contributor

jocel1 commented Dec 5, 2017

Bug confirmed on MySQL side

@mickaelandrieu mickaelandrieu added the 1.7.x label Dec 6, 2017

@Quetzacoalt91 Quetzacoalt91 merged commit b5dd70c into PrestaShop:develop Dec 13, 2017

2 checks passed

codacy/pr Good work! A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Quetzacoalt91

This comment has been minimized.

Show comment
Hide comment
@Quetzacoalt91
Member

Quetzacoalt91 commented Dec 13, 2017

Thank you @jocel1

@eternoendless eternoendless added this to the 1.7.4.0 milestone Apr 13, 2018

@eternoendless eternoendless changed the title from add FORCE INDEX to workaround https://bugs.mysql.com/bug.php?id=88671 to Add FORCE INDEX to workaround bug in MySQL Jun 6, 2018

@prestonBot prestonBot added the develop label Jun 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment