S
S
Sasha Brahms2015-10-30 11:37:53
PHP
Sasha Brahms, 2015-10-30 11:37:53

How to correctly display information from different DBMS tables?

It is necessary to draw a conclusion of subscribers, each user has an avatar, status, rating
How will it be correct to implement everything?
JOIN's ?
Some kind of too heavy request will come out, and there will be too many requests for each user ..
How to design everything correctly, tell me please?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Michael, 2015-10-30
@Dlike

SELECT avatar, status, rating FROM users WHERE id IN (1, 4, 12, ... , N
)

D
Dmitry Kovalsky, 2015-10-30
@dmitryKovalskiy

Yes JOIN. You can write 1 storage, in which 2 requests are made. First, the list of subscribers for display is selected into the temporary table, and the second, based on the results of the first, information is selected for output.

A
Andrew, 2015-10-30
@R0dger

obligatory keys and indexes in the database
1. Cache data from the database
2. Make storage not in Mysql, but some NOSQL document-oriented database (mongo
) think .. and so share the skin of an unkilled bear ....

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question