In fact, this question is always mentioned during the interview.
1. Create a special summary table (this table is usually used for statistics processing every night) and index creation (index insertion and modification will be slow, which is also one of the only statistical reasons) for query, if the volume is very large, the table sharding is still large. Database sharding is the concept of a data warehouse.
2. Join Table query (Multi-table joint query) of big data, first is 1 (multiple tables are made into one statistical table, or multiple tables are processed as statistical tables ), no matter whether the association is closed or not, make a statistical table. If you have to operate the table for processing, it is a good way to make a view.
3. database solution: a partition table divides the data of a large table into many small subsets called partitions.
I don't understand other related DBA query Optimizations