fbpx
Revolutionizing E-Commerce: Unmasking the Search Performance Pitfall in Magento and How to Outsmart it

Revolutionizing E-Commerce: Unmasking the Search Performance Pitfall in Magento and How to Outsmart it

Magento, a common e-commerce platform, suffers from a flaw related to its "Popular Search Term Cache" feature. This issue arises from repeated queries and an unnecessary DISTINCT operator, particularly impacting the search performance in Magento 2.4.6 Commerce version and others. The burden on the database CPU slows search operations, especially when the search_query table expands to millions of terms. Solutions include removing the DISTINCT operator from the query in \Magento\Search\Model\ResourceModel\Query\Collection, resulting in better performance. Other fixes involve overriding the execute function in the Magento_CatalogSearch/Controller/Result/Index to do away with getCacheableResult code, along with editing the query and adding an index to the search_query table. Also, asynchronously inserting search terms in smaller chunks can help. These temporary measures, while waiting for a permanent fix from Magento, can improve the platform's e-commerce performance.

Full article here: https://lawsuithelpdesk.com/revolutionizing-e-commerce-unmasking-the-search-performance-pitfall-in-magento-and-how-to-outsmart-it/

YouTube
LinkedIn
LinkedIn
Share