For years, one of my Top Performance Tips for making Magento a little faster on the Frontend was to change a simple setting in the backend. Specifically, I’m referring to the Flat Catalog setting found within Stores > Configuration > Catalog > Catalog > Storefront:
This setting is available in both M1.x and M2.x. It works by gathering the applicable Product Attributes within your Magento Database and merging them into a smaller (light-weight) table. Thus, making information retrieval less resource intensive for your web server.
The contents of this table would then only be updated once you Reindex your store. You can find more information about Indexing in this post: How to reindex Magento 2 manually.
Time to stop using Flat Catalog
However… Today, I was made aware (thanks to Eden4ever) that as of Magento 2.3.0 it’s actually recommended to disable this option. In the Official Magento Documentation you will now find this warning:
Starting with Magento 2.3.0+, the use of a flat catalog is no longer a best practice and is not recommended. Continued use of this feature is known to cause performance degradation and other indexing issues. A detailed description and solution is available in the Help Center.
Well, according to Magento, continued use of Flat Catalog in Magento 2.3.x can result in site performance issues such as slow running and stuck crons caused by flat tables and indexers.
So far, I’ve not been able to find any data that supports this new recommendation. I have personally not seen any performance issues by leaving these settings enabled. I suspect this came about from Magento receiving complaints from large stores (e.g. 500,000+ products).
What should I use instead?
Again, I have not seen any suggestions from Magento with what you should replace the setting with. They do mention Elasticsearch, so I suspect that service (which is natively supported in M2.3.x) helps take some of the pressure off the Database.
So now you know, if you’re running M2.3.x and your cron/indexers keep getting “stuck” then try disabling Flat Catalog.
I’ll leave this post open for a bit if you have any data which supports this change. Otherwise, feel free to let me know your thoughts.