Flat catalog is a feature in Magento 2 that can improve the performance of your online store by optimizing the way product data is stored and retrieved from the database. In traditional EAV (Entity-Attribute-Value) database structure, product data is stored across multiple database tables, which can result in slower database queries when retrieving product information. Flat catalog, on the other hand, consolidates product data into a single table, making database queries faster and improving page load times.
- Go to Stores > Configuration > Catalog > Frontend.
- Expand the Storefront section.
- Set the Use Flat Catalog Category and Use Flat Catalog Product fields to Yes.
- Click Save Config.