Magento: Describing Flat Catalog

Difference between EAV and Flat Catalog

In EAV database model, data are stored in different smaller tables rather than storing in a single table.

Like,
product name is stored in catalog_product_entity_varchar table

product id is stored in catalog_product_entity_int table

product price is stored in catalog_product_entity_decimal table

EAV database model is used by Magento for easy upgrade and development as this model gives more flexibility to play with data and attributes.

When flat catalog is enabled in Magento then all the above product attributes (id, name, price) are kept in one table named like catalog_product_flat. Then Magento fetches product data from the flat table rather than joining all the other smaller tables.

There are two types of Flat Catalog:
1) Flat Catalog Product
2) Flat Catalog Category

  • Flat Categories are recommended for any Magento installation for improved performance.
  • Flat Products is designed and recommended for catalogs that have over 1000 SKU’s.

Enable Flat Catalog Category:

Old Magento version
– Go to Admin Panel->System->Cache Management->Rebuild Flat Catalog Category
– Go to Admin Panel->System->Configuration->Catalog->Frontend->Use Flat Catalog Category = Yes

New Magento version
– Go to Admin Panel->System->Index Management
– Select ‘Product Flat Data’
– Click ‘Reindex Data’ link for that row
– Go to Admin Panel->System->Configuration->Catalog->Frontend->Use Flat Catalog Category = Yes

Enable Flat Catalog Product:

Old Magento version
– Go to Admin Panel->System->Cache Management->Rebuild Flat Catalog Product
– Go to Admin Panel->System->Configuration->Catalog->Frontend->Use Flat Catalog Product = Yes

New Magento version
– Go to Admin Panel->System->Index Management
– Select ‘Category Flat Data’
– Click ‘Reindex Data’ link for that row
– Go to Admin Panel->System->Configuration->Catalog->Frontend->Use Flat Catalog Product = Yes

Remember that, initially the selection list of

Admin Panel->System->Configuration->Catalog->Frontend->Use Flat Catalog Product
OR,
Admin Panel->System->Configuration->Catalog->Frontend->Use Flat Catalog Product

is non-editable. You have to rebuild Flat Catalog from Cache Management (old Magento version) or Index Management (new Magento version). Only then the selection list becomes editable.

Hope this helps. Thanks.