Home > database > Consult everybody, from the perspective of computer principle, explain the slow query the cause of h
Consult everybody, from the perspective of computer principle, explain the slow query the cause of h
Time:09-20
as title
CodePudding user response:
The original poster is to combine the ORACLE database (or other) to understand the problem?
CPU ultra-high, essence is to make the CPU work too much, to the CPU burden, you can come down,
1, the CPU's operation ability, can't keep up with the actual computing needs, 2, algorithm, let the CPU go too many detours, do too much useless, the CPU will be high,
The method to solve the problem of the above two: Improve the hardware performance, such as increasing the number of CPU, increase the ability of a single CPU computing (is simply to change CPU) Solve the problem of algorithm, it is commonly used equivalent algorithm of low cost,
A simple example: With 100 w rows of data in a large table, often in a column to do data query, if a full table scan, every time taking out the data of 100 w, each line logic operation time, obviously, the number of operation is 100 w,
If added an index on the column, then, operations will be down by 30 times, the work of CPU capacity is only one over thirty thousand of the original,
PS: I write this two sentences simple, welcome everybody many exchanges,