Tuesday, 15 April 2014

database - Alternative/Faster way to model this data -


Our mother-in-law helps in promoting eCommerce stores effectively, to do so, to maintain a lot of data Required - Promotional data and all the products which are promoted with each customer group that apply to these promotions I have made this data normal but I think one of these tables, Promotion Products, is very fast Sic And can slow down our most important questions.

Here's how this table comes so fast: If a promotion runs 25,000 products and 10 customer groups per week in a store, then 250,000 new entries / week (2) in the promotional product table 1 million / mo). Since this is a mother-in-law product, we have so many customers who create similar data or more.

How can I improve this schema so that the data of promotion products can be inquired quicker?

  Products - Product_id - Customer_ID - Name Promotion - Promotion_ID - Customer_ID - Promotions (i.e., lack of 20%) Promotion - Products (Need to be read fast) - Product_id - Promotion_Aud - Customer_ID - Group_ID (each offer related w / one or several client groups)  

Is that you've denormalized it by adding customer_id to the Promotion_products table, which will help You should consider, especially if this is indexed, you can consider the promotional table clustering by the customer and promotion_id

I am wondering why group_id and customer_id are in promotion products, because it seems that in a group_id It seems that it is related to many customers.

All indices are the fields that you intend to query.


No comments:

Post a Comment