What are the options, in addition to join to get the related information?

On the website there is a need to display some information, say - lists of goods.
The goods are from various suppliers (users), in different regions. Information about these should also be displayed in the item card.
I.e., the products table in the query are the join's on multiple tables:
select * from products, users, regions, cities ....

to all this adds a bunch of conditions in the where clause, which creates problems in creating indexes - if you can't achieve good results and to find a optimal index.

To do multiple queries for each item type
$product = Product::findById(123);
$user = User::findById($product->id)

not an option:
1. They will be too much
2. The code is already written - to be rewritten for a long time, there is the ORM, which broadcasts the resulting array from the current query to a collection of objects...

No-cache, implement a long time.

What are the other options?
March 25th 20 at 13:41
0 answer

Find more questions by tags Data processingSQL