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,

CodePudding user response:

reference 1st floor wmxcn2000 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 the simple sentence, welcome everybody many exchanges,


Hello moderator combined with mysql or oracle is needed to understand the problem, is refers to the low cost algorithm, using multiple low configuration machine instead of high configuration machine processing operation?

CodePudding user response:

Low cost algorithm, refers to the optimization algorithm, is not a machine to replace more machines,

Multiple machines, have their own noun: distributed, grid computing, cloud computing, etc., is one of the solutions,

CodePudding user response:

reference wmxcn2000 reply: 3/f
low cost algorithm, refers to the optimization algorithm, is not a multiple machines to replace a machine,

Multiple machines, have their own noun: distributed, grid computing, cloud computing, etc., is one of the solutions,


Eldest brother can tell me about the content of the low cost algorithm, Google, baidu is not easy, consult!
  • Related