Home > database >  Orcal database after new index, add and delete statements in your code still need to modify?
Orcal database after new index, add and delete statements in your code still need to modify?

Time:10-09

From colleagues leaving the company took over a project based on orcal database, system function complete, is operating again when the database is too slow, seriously affect the experience,
After the preliminary research, found that the structures, the relational database, the index is not used,
I want to ask is, after I add index to database, system code side also need to adjust the database SQL statement? Join after the index, the system response is fast?
I am beginner, ask god to help, but as far as I'm in the cognitive level of now, don't need to modify the system code,

CodePudding user response:

Don't need to modify the code,
Add index is to use SQL to the index improve the query speed,
Suggest that baidu learning the knowledge of the index,

CodePudding user response:

Premise is the where after build the index of the column conditions of use to you, otherwise can't improve query performance, general index is built on the filterability in the where clause for the strongest fields,

CodePudding user response:

Built the corresponding index, the optimizer think go low price index would go index,
Suggest that generate a who runs AWR report, analyze the inside of the top SQL optimization to improve performance,
Can also be slow for some operations of a separate analysis of SQL optimization

CodePudding user response:

refer to the original poster heiha2020 response:
from colleagues leaving the company took over a project based on orcal database, system function complete, is operating again when the database is too slow, seriously affect the experience,
After the preliminary research, found that the structures, the relational database, the index is not used,
I want to ask is, after I add index to database, system code side also need to adjust the database SQL statement? Join after the index, the system response is fast?
I am beginner, ask god to help, but as far as I'm in the cognitive level of now, don't need to modify the system code,

1, add delete index or index, don't need to adjust the code, but may have an impact on the performance of the SQL;
2, after add index whether can improve the performance of the SQL, that depends on whether the index, index is the most appropriate;
3, SQL optimization is door knowledge, you can see some information about that specific is by accessing and viewing for the SQL statement execution plan is analyzed, and optimization of some inside knowledge or more, but as a developer, if know SQL optimization is also an advantage, can try to learn,
  • Related