1

I have added several columns to sales_order_grid_items so that I can see product attributes in the products sold report.

Since products are likely to be deleted I cannot do a 'join' to the product in the report and expect to retrieve attribute values. So the extra attributes need to be stored somewhere.

Does anyone have idea as to the performance considerations of adding columns to sales_order_grid_items?

In theory I could serialize my extra columns and spend ages trying to work out how to display them in the products_ordered report, however, are there likely to be performance benefits?

  • How many columns are you planning on adding? What is data types of these product attribute columns (INT, VARCHAR, TEXT)? – Ian Feb 7 '14 at 16:17
  • I am adding 3 INT, 5 DECIMAL and 1 TEXT column, so that is a total of 8 columns. – Theodores Feb 7 '14 at 17:01
2

I don't think there will be a huge impact on the performance by adding 8 columns to a table. I think it is even better than joining with a products table even if you kept the products all the time.

Also something is troubling me. I don't see any sales_order_grid_items table in my magento instance. I assume you are talking about sales_flat_order_items.
Anyway, I say, add your columns. It won't crash your website.

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.