Tweaking magento for performance

Tweaking magento for performance

July 9, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Tweaking magento for performance

Optimizing Magento for Performance: A Comprehensive Guide

Disclaimer: This post is intended as a general guide. Please consult with your web developer or our expert team at Laravel Company for specific advice tailored to your store.

Identifying the Problem: High SQL Queries on Search Pages

Jaro has identified an important issue—Magento’s core queries are causing significant database load, especially on search result pages. Let’s break down this problem and explore solutions.

The issue arises from several factors:

  1. Bloated configuration: Magento is packed with features by default, many of which aren’t necessary for all stores.
  2. Heavy extensions: Third-party plugins often add unnecessary queries and increase database strain.
  3. Caching issues: When cache isn’t properly managed or optimized, it can lead to excessive queries.

Reducing SQL Queries: A Step-by-Step Approach

1. Disable Unused Features

Begin by disabling features you don’t need:

  • Top navigation
  • Layered navigation
  • Product listing (if not required)

To disable a feature, navigate to Stores > Configuration. Find the relevant section and set it to “Disabled”.

// Example: Disabling layered navigation in config.xml
<catalog_layered_navigation>
    <active>true</true>
</catalog_layered_navigation>

2. Clear and Optimize Cache

Clearing cache can significantly reduce queries:

  1. Clear all cache in System > Tools > Cache Management.
  2. Manually delete cache files via FTP or SSH at var/cache/.

To optimize cache, consider using Redis for faster performance.

3. Analyze and Reduce Queries with an Extension

Extensions like Amasty’s Indexer can help identify and reduce excessive queries. They provide visual representations of database loads and suggest optimizations.

Optimizing Block Creation Time

1. Minimize Blocks per Page

Reduce the number of blocks displayed on search pages:

  • Remove unnecessary sidebar, top, or footer blocks.
  • Use Layout Update XML to manage block visibility.
<!-- Example: Hiding a block -->
<reference name="right">
    <action method="setBlockClass"><class>col-left</class></action>
    <remove name="catalog.compare.side"/>
</reference>

2. Optimize Block Code

Write efficient code for your blocks:

  • Use load() sparingly; prefer getCollection()->addFieldToFilter().
  • Minimize joins and use EAV tables strategically.

When to Seek Professional Help

While this guide provides a starting point, complex performance issues often require deep investigation. Consider seeking help from our experts at Laravel Company if:

  1. You’ve tried these steps but haven’t seen significant improvement.
  2. Your store has many customizations or third-party extensions.
  3. The issue is affecting your site’s SEO or conversion rates.

Conclusion: Persistent Optimization

Remember, performance optimization isn’t a one-time task; it requires continuous monitoring and adjustment. Regularly review your queries using tools like PHPSTORM, Xdebug, or database logs to identify new bottlenecks.

By following these principles and staying vigilant, you can keep your Magento store running smoothly for both customers and search engines.

Catalog Cache Database Performance

Our network