I fell again on the road to go online with confidence

A certain business system was told that it needed to go online in 3.5, because the system has been in trial operation for a long time, and it still feels very rigid, and basically there should be no faults.

Later, I was told that the CPU of the database server occasionally spiked, but it passed when I went to see it, and then I still felt that it didn't matter.

To this day, at the moment of soaring high, I happened to be online, so I used my artifact to grab SQL urgently, and then I grabbed the inefficient SQL in order:

select count(*)  

from AAAA  a left join BBBB  b

on a.userid=b.userid

where    1=1  and a.iseffect='1'   and (a.recordtype='5' or  a.recordtype='6' or  a.recordtype='8' )  

As soon as I ran, such a simple SQL could not run in 1 minute.

It is found that the data types of the two tables are not correct, and there is no index.

 

So I contacted the business manufacturer, and the business manufacturer gave me the real situation as soon as possible. The data migration was done some time ago. The table structure and data were migrated, but the index forgot to migrate.

There is no explanation for the data type problem, and I don't know why. . . . .

It seems to be the problem of "temporary workers"

In a harmonious society, "temporary workers" are an indispensable existence~~~~~~~~~~~~~~~~~~~~~~~~

Guess you like

Origin blog.csdn.net/David_ifx/article/details/114606398