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

Performance degradation on catalog page #1921

Closed
IvanPletnyov opened this issue Nov 22, 2018 · 2 comments
Closed

Performance degradation on catalog page #1921

IvanPletnyov opened this issue Nov 22, 2018 · 2 comments
Assignees
Milestone

Comments

@IvanPletnyov
Copy link
Contributor

IvanPletnyov commented Nov 22, 2018

Preconditions

  1. Magento with MSI
  2. Load performance fixtures
    bin/magento setup:perf:generate-fixtures setup/performance-toolkit/profiles/ce/small.xml
  3. Enable SQL profiler

Steps to reproduce

  1. Open category page (example http://localhost/category-4.html)

Magento with MSI profiler results

SQL query example:
msi

image

Magento without MSI profiler results

SQL query example:
ce

image

Query with explain

With MSI:

  1. With conditions
    1
  2. Without conditions
    2

Without MSI:
3

Additional info

  1. Build on bamboo
  2. Paying attention, if we transfer all products from default stock to custom stock, page load speed approximately equal to magento without MSI.
    SQL load speed on custom stock:
    image
@maghamed maghamed added this to the MSI Part III milestone Nov 22, 2018
@vickdoan vickdoan self-assigned this Nov 23, 2018
@maghamed
Copy link
Contributor

hey, @vickdoan is there any update on this issue or maybe some assistance needed from our side?

@Stepa4man
Copy link
Contributor

Stepa4man commented Dec 16, 2018

@maghamed, I did some investigation for category page performance.
I found 15 queries that have a very low performance. I have checked it
And I have several conclusions:

  • All slow queries contain join to inventory_stock_1 sql view and it can't be indexed because it's just view (query without this sql view works like 10 times faster)
  • Some of the queries have unnecessary joins to catalog_product_enity table just for the purpose to provide sku for join inventory_stock_1. (We don't need it, once we have product_id field in inventory_stock_1. We have to get rid of this join in spite of this will not solve any performance issue)
  • Join by sku field between inventory_stock_1 view and another table (join by varchar field is anyway slower then join by int, so using product_id from the previous paragraph will solve this issue)

I suppose that changing all joins inventory_stock_1 view from sku to product_id will decrease at least 50% of all degradation.

Here is a db logging file with this 15 queries and stack trace.
(It was logged using medium profile)
msi-performance.log

P.S. I have already fixed with this pulll request for category page

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

No branches or pull requests

5 participants