Can anyone provide a clarification on the differences between EAV and Flat catalogs, when accessing the sub categories of a category?


If flat catalog is enabled, then in any product list the flat tables will be used. The flat tables are generated one per store view when rebuilding the flat index. They contain all the attributes marked as 'Used in product listing', one column for each attribute. This is a big boost in performance because instead of a lot of joins to get the product attributes Magento only reads from one table (actually 2, the flat table and the prices index table).
IN the product view page the flat table is not used. Instead all the attributes are loaded from the EAV tables.

  • Flat Catalog, and any flat table = The old keyed relational database we've come to know and love. And pulling EAV data into flat tables has been the way to speed up data access from EAV since way back when EAV was conceived. Oct 8 '13 at 18:19

Your EAV attribute is used as a column of flat table (catalog_product_flat_*) if:

  • Use In Layered Navigation ->not No
  • Use for Promo Rule Conditions ->yes
  • Used in Product Listing ->yes
  • Used for Sorting in Product Listing ->yes
  • Attribute type is 'static'
  • And attribute is system attribute like [status, tax_class_id, price, weight]

Flat tables have great performance rather than multiple joins of EAV structure when loading collection of products. Flat tables of category (catalog_category_flat_store_*) is also like above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.