Home > database >  How Mysql query 100 data in the table
How Mysql query 100 data in the table

Time:09-20

Met a archives today interview questions he asked how mysql check 100 list have more than one table LianZha statistic number of aggregation function of SQL statements have bosses teach small white

CodePudding user response:

Multi-table query, one way is to join, a way is the union,
Multi-table connection after polymerization principle of documentary table, only the results of multiple tables associated set grouping polymerization, you can put the multi-table associated result set as a single table

CodePudding user response:

reference 1st floor by the stars of a cold response:
multi-table query, one way is to join, a way is the union,
Multi-table connection after polymerization principle of documentary table, just for a table of the result set to group aggregation, you can put more tables associated result set as a single table
to associate 100 tables for the last time I said so, he said the server will be Fried by you

CodePudding user response:

refer to the second floor? Response:
Quote: refer to 1st floor by the stars of a cold response:
multi-table query, one way is to join, a way is the union,
Multi-table connection after polymerization principle of documentary table, just for a table of the result set to group aggregation, you can put the multi-table associated result set as a single table
to associate 100 tables for the last time I said so, he said the server will be Fried by you


Then you should ask at that time, the check data from 100 tables, again a little bit specific needs is what?
If there is the demand of the relationship, it is only related to the server to fry, and put forward the problem of people have a problem,

If just query 100 tables of data, it can use the union, or split the 100 tables to different from the library to read,

Or does he want to go to you on code query 100 tables in parallel way to solve,

CodePudding user response:

If there are any products or give you a demand to check 100 tables associated data, you can drag him out to play, if you do this, you can put the design of the database first, if really need to do so, consider system reconstruction, this is not a person can solve the problem,

CodePudding user response:

The partition table is likely 10 years of data every month for a 1 year 12 months partition table
  • Related