M
M
mr_drinkens892017-05-03 12:10:47
Django
mr_drinkens89, 2017-05-03 12:10:47

How to properly design products with options?

Good day.
The essence of the question is this: an online clothing store.
Structure: there are products of different colors, each color has its own size.
Now I sell in this way:
Virtual goods 1 (general) - Virtual goods 2 (by color) - Real goods (by size for each color).
The problem is that there are too many queries to the database, the waiting time for the user is too long.
Also, there is a search on the site and filtering, which I carry out through haystack + elasticsearch. With such a structure as it is now, it is rather problematic to "cram" all the information about the product into the index. As a result, there will be queries to the database again.
Tell me, who solved a similar problem? What structure did you choose?
Thank you

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question