Problems associated with the use of a temporary table of data of low efficiency

          Today we are investigating a data transfer problem, we found a greater amount of data transfer, resulting in transmission timeout. We have carefully examined the association of a data table, we find

Nearly 20 tables during the association data of a business table after more than 10 basis associated with the amount of data there are thousands of data growth for tens of thousands of pieces of data, we use mostly left join,

But when we finally linked to a table, the table is a temporary table, fewer than 10 data, but as long as a correlation table query speed immediately dropped by more than hundredfold all.

          After several tests have confirmed is associated with the temporary table data is a key factor in overtime, so we consider this a temporary table to import data into a table, do physical association.

Thus efficiency is greatly enhanced, and also solves the problem of data timeout.

          After this personal experience, feel the real inefficient temporary tables in some special occasions, it is recommended that you prefer to use a temporary table of friends, in the use of temporary tables must consider

Efficiency.

Reproduced in: https: //www.cnblogs.com/kevinGao/p/3702275.html

Guess you like

Origin blog.csdn.net/weixin_33976072/article/details/93368584