Record a query optimization of mysql database

The associated query between the two tables, the CRT_HOUSESALESTATUS_CHECK table has a data volume of 4.5 million, and the crt_houseinfo_check table has a data volume of 7 million.

The data after adding the where condition are 1100 and 2100 respectively

During the associated query, the data has not been queried.

The solution is to create a temporary table, first query the data to be associated with the two tables and put them in the temporary table, and use the data in the temporary table to do the associated query, so that the result will be obtained in 1.5 seconds.

Guess you like

Origin blog.csdn.net/liangmengbk/article/details/129286426