3

In Magento CE 1.7.0.2 in database there are two separate tables for example In case of order, data store in sales_flat_order and sales_flat_order_grid tables but if you see column then sales_flat_order_grid is nothing but subset of sales_flat_order, why magento need two separate table to manage order data as sales_flat_order is enough?

same thing applicable for shipment, invoice, credit memo and etc.

2

The tables without _grid at the end (the original tables) hold a lot of data that is not needed when looking at the orders (or invoices or shipments or credit memos) grid.
So for performance reasons there is an additional table (_grid) that holds only the data necessary for the admin grid.
[EDIT]
Also this separation gives you the ability to archive orders (there is such a functionality in EE). Basically the archived orders are moved from the table sales_flat_order_grid to an other table and you don't see them in the admin grid anymore but they are still present in the "big table" and available for reports and other operations. Again ...less data to work with.

3

The grid table is necessary for the separation of the production data table when performing work on the admin.

Sorts, queries, and reports in the admin view all have a potential impact on causing read locks which may prevent order data from being written to the sales_flat_order_* tables during an order placement. This is even worse when sorting on an unindexed column in the order view or when exporting to CSV.

For this reason the _grid tables were introduced to prevent admin behavior from affecting the customer experience.

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.