Enable Flat Tables for Products and Categories in Magento

  • Avinash
  • 0
  • Aug 13, 2011
  • Tips & Tricks

Magento uses the EAV database structure for storing the Products and Categories. Magento is extremely flexible because of the EAV database structure. To know more about the EAV database structure see my post on EAV database structure in Magento.

But EAV database model is not much faster in terms of the performance. This is because we need perform query on three tables to get single data. This is the main drawback of the EAV database model.

But don’t worry at all, because magento has provided the option to use the EAV database structure or not. Yes, you have read correctly. We can enable the flat database model in model and can store the products and categories in traditional way which is called Flat Database Structure.

How to Enable Flat Categories and Products in Magento:

  1. Login to admin panel.
  2. From Top Menu >> System >> Configuration
  3. In Catalog section click on catalog link. There you will find the Front End section. Expand that Front End section to enable the Flat Database.
  4. Set “Use Flat Catalog Category” and “Use Flat Catalog Product” to Yes and save the changes. For more information have a look at below image.

Enable Flat database model in Magento

After updating to Flat category and products you need to Re-index the data from the Magento Index Management.

Note: It is recommended to use the magento Flat Database for Products and Categories if you are facing performance related issues with magento.

Related Posts

Written by Avinash

Avinash Zala currently working at a leading web development company as a Sr. PHP Web Developer. He is the founder of the Xpert Developer. He has completed B.E. in Information Technology. Born and brought up in Ahmedabad. He loves to code and coding is all about passion for him. Follow him on twitter at Avinash Zala & Xpert Developer.

View all posts by: