Skip to content
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 index on ps_orders.'invoice_date' #31218

Merged
merged 1 commit into from
Apr 19, 2023
Merged

Conversation

AdrienPlx
Copy link
Contributor

@AdrienPlx AdrienPlx commented Feb 6, 2023

Related to pull request #30949 (#30949)

Questions Answers
Branch? develop
Description? On AdminStatsController there is a request (BestCategory) taking huge time to execute (14s on my shop) when you have a consequent catalog. This request is executed in getKpi method in Category admin controller (ajax methods). This index on ps_orders.'invoice_date' reduce this waiting time from 14s to 0s.
Type? improvement
Category? BO
How to test? Go to categories listing page in BO and analyse network timing on this request : index.php?controller=AdminStats&ajax=1&action=getKpi&kpi=top_category. It will be significant if you have a shop with a lot of categories, orders and products. Add the index on ps_orders.'invoice_date' and see the difference 👍
Related PRs PrestaShop/autoupgrade#560

@AdrienPlx AdrienPlx requested a review from a team as a code owner February 6, 2023 10:41
@prestonBot
Copy link
Collaborator

Hello @AdrienPlx!

This is your first pull request on the PrestaShop project. Thank you, and welcome to this Open Source community!

@kpodemski
Copy link
Contributor

Thanks @AdrienPlx !

A few things are missing:

  • a table in the description for the Pull Request
  • a PR for autoupgrade module that will add this index during the upgrade from previous PrestaShop versions - it looks like you could create 9.0.0.sql file :) here's an example of such PR: https://github.com/PrestaShop/autoupgrade/pull/553/files

@prestonBot prestonBot added 8.0.x Branch Improvement Type: Improvement develop Branch labels Feb 6, 2023
AdrienPlx added a commit to AdrienPlx/autoupgrade that referenced this pull request Feb 6, 2023
Related to pull request PrestaShop/PrestaShop#31218. Improve back office performances on Categories lisiting
@AdrienPlx
Copy link
Contributor Author

Thanks @AdrienPlx !

A few things are missing:

  • a table in the description for the Pull Request
  • a PR for autoupgrade module that will add this index during the upgrade from previous PrestaShop versions - it looks like you could create 9.0.0.sql file :) here's an example of such PR: https://github.com/PrestaShop/autoupgrade/pull/553/files

Hi !

This is done :)
PrestaShop/autoupgrade#560

@kpodemski kpodemski removed the 8.0.x Branch label Feb 17, 2023
@kpodemski kpodemski closed this Mar 13, 2023
@kpodemski kpodemski reopened this Mar 13, 2023
@kpodemski kpodemski requested a review from a team March 30, 2023 08:38
@kpodemski kpodemski added the Waiting for QA Status: action required, waiting for test feedback label Mar 31, 2023
@kpodemski
Copy link
Contributor

@PrestaShop/qa-team it's quite a technical change, we could use auto-tests and manual check by a dev, wdyt?

@Robin-Fischer-PS Robin-Fischer-PS added the Waiting for dev Status: action required, waiting for tech feedback label Apr 3, 2023
@Robin-Fischer-PS
Copy link
Contributor

@kpodemski Indeed, a check by a dev would be nice on this one. Thanks :)

@kpodemski kpodemski removed Waiting for QA Status: action required, waiting for test feedback Waiting for dev Status: action required, waiting for tech feedback labels Apr 19, 2023
@kpodemski kpodemski added this to the 9.0.0 milestone Apr 19, 2023
@kpodemski
Copy link
Contributor

It works like a charm! I tested the upgrade and clean version.

@kpodemski kpodemski merged commit 6e270fa into PrestaShop:develop Apr 19, 2023
@kpodemski
Copy link
Contributor

thank you @AdrienPlx

@jolelievre jolelievre changed the title Add index on ps_orders.'invoice_date' Add index on ps_orders.'invoice_date' Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
develop Branch Improvement Type: Improvement
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

8 participants