Learn about oracle pl sql performance tuning tips techniques, we have the largest and most updated oracle pl sql performance tuning tips techniques information on alibabacloud.com
) function. Distinct requires a sort operation, while the others need to perform at least two sorting. Typically, SQL statements with union, minus, and intersect can be overridden in other ways. If your database is well-sort_area_size, using union, minus, intersect can also be considered, after all, they are very readable()optimize GROUP By:Increase the efficiency of the group BY statement by filtering out unwanted records before group by. The followi
Operating Environment: AIX + 11g + PLSQL
Includes the following content:
1. SQL statement execution process
2. optimizer and execution plan
3. Properly apply Hints
4. Indexes and Application Instances
5. Other optimization technologies and applications1. SQL statement execution process 1.1 SQL statement execution steps
1) analyze the syntax and analyze whether th
With the SPA, you can play specific types of changes depending on the type of change (such as initialization of change, optimizer statistics refresh, and database upgrade)SQL or the entire SQL payload, and then generate a comparison report that helps you evaluate their impact.In the version number prior to Oracle Database 11g, I had to capture all the
With SPA, you can play a specific stream based on various types of changes (such as initialization parameter changes, optimizer statistics refresh, and database upgrades)SQL or the entire SQL load, and then generate a comparison report to help you evaluate their impact.
In versions earlier than Oracle Database 11g, I must capture all
For a period of time performance test, put oneself in the performance test process, use the Oracle used in the SQL statement to organize, do a memo;(1) Multiple fields are spliced in some format"||" string concatenation characters;Example: concatenation of "id" and "code" with commas: select T.id| | ', ' | | T.code fro
oracle| Performance | optimization
39. Always use the first column of the index
If the index is based on multiple columns, the optimizer chooses to use the index only if its first column (leading column) is referenced by the WHERE clause.
Translator by:
This is also a simple and important rule. See the following examples.
Sql> CREATE TABLE Multiindexusage
statement by filtering out unwanted records before group by. The following two queries return the same result but the second one is obviously much faster.
Low efficiency:
SELECT JOB, AVG (SAL)
From EMP
GROUP JOB
Having JOB = ' PRESIDENT '
OR JOB = ' MANAGER '
Efficient:
SELECT JOB, AVG (SAL)
From EMP
WHERE JOB = ' PRESIDENT '
OR JOB = ' MANAGER '
GROUP JOB
Translator by:
This section and section 14 are the same. can skip over.
50. Date of Use
When using the date is, be awa
The Oracle tutorial you are looking at is: Oracle SQL Performance Tuning Series learning three. 8. Use the Decode function to reduce processing time
Use the Decode function to avoid repeatedly scanning the same record or repeating the same table.
For example:
SELECT COUNT
Database has always been its own weak item, and now with this article slowly accumulate some of the techniques of Oracle SQL optimization.1. First of all, it is easy to think of all the optimization techniques-index, index What is the use? Indexes do increase query speed when the table data is large, and the index quer
is used, be sure to explicitly delete all temporary tables at the end of the stored procedure, TRUNCATE table first, and then drop table, which avoids longer locking of the system tables.25. Avoid using cursors as much as possible, because cursors are inefficient and should be considered for overwriting if the cursor is manipulating more than 10,000 rows of data.26. Before using a cursor-based method or temporal table method, you should first look for a set-based solution to solve the problem,
involved in the change of the data is a large table, if not used to the index, the efficiency of the query will be affected.NLS_COMP Specifies the collation behavior of the database session.Values:
BINARY
Normally, comparisons in the WHERE clause and in PL/SQL blocks are binary unless you specify the Nlssort function.
Linguistic
comparisons for all
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.