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

CategoryService - Reduce select attributes to improve query performance #849

Merged
merged 3 commits into from
Apr 10, 2024

Conversation

ugljesaspx
Copy link
Collaborator

Change select attribute, get category name only instead of all data for speed optmization

@ugljesaspx ugljesaspx assigned ugljesaspx and supercid and unassigned ugljesaspx Mar 25, 2024
@supercid
Copy link
Member

supercid commented Apr 9, 2024

I made a quick test and there's a considerable time to be gained by selecting only name and level:

Using name and level

https://magento245.dev.nos.to:8443/argus-all-weather-tank.html

/Men/Tops/Tanks
/Collections/Eco Friendly

string(26) "total: 0.00034308433532715"
string(25) "total: 0.0003058910369873"
string(26) "total: 0.00029301643371582"

https://magento245.dev.nos.to:8443/breathe-easy-tank.html

/Women/Tops/Bras & Tanks
/Promotions/Women Sale
/Collections/Erin Recommends

string(26) "total: 0.00037479400634766"
string(26) "total: 0.00040292739868164"
string(26) "total: 0.00037288665771484"
string(26) "total: 0.00029587745666504"

Using *

https://magento245.dev.nos.to:8443/argus-all-weather-tank.html

/Men/Tops/Tanks
/Collections/Eco Friendly

string(25) "total: 0.0005650520324707"
string(26) "total: 0.00055503845214844"
string(26) "total: 0.00046110153198242"

https://magento245.dev.nos.to:8443/breathe-easy-tank.html

/Women/Tops/Bras & Tanks
/Promotions/Women Sale
/Collections/Erin Recommends

string(26) "total: 0.00069403648376465"
string(26) "total: 0.00059390068054199"
string(25) "total: 0.0005488395690918"
string(26) "total: 0.00052189826965332"

@supercid supercid changed the title Change select attribute, get category name only instead of all data f… CategoryService - Reduce select attributes to improve query performance Apr 10, 2024
@supercid supercid merged commit cc20c15 into develop Apr 10, 2024
6 checks passed
@supercid supercid deleted the spx_optimization_category branch April 10, 2024 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants