Author: Jiangnan BaiyiFrom 8 I to 10g, Oracle constantly evolved its own SQL tuning intelligence, and some secret-level optimization tips have expired.However, I like to be ineffective. I don't have to worry about it. I love to stick to toad for Oracle Xpert, and I love to do things based on the general direction of co
adjustment is described earlierThree different methods.Common tuning methods for top sql:1, if the statistical information is not allowed or because the CBO calculates some of the SQL cost of the formula used to cause SQL performance problems, we can by re-collect statistics, or manuallyModify the statistics, or use h
DBMS_SPM packageLoad_plan_from_cursor_cache process or load_plan_from_sqlset process to migrate itto the SQL plan baseline. When the migration is complete, you should disable or delete the original storage outline.
Possible SQL Plan manageability Scenarios
What are the possible SQL plan manageability scenarios? Database Upgrade: When you upgrade a
Label:This document is based on the relevant data collated, summarized, mainly on the Oracle database, to obtain the most authoritative and correct method of SQL statement execution plan, and also explained in detail the meaning of the options available in each method and how to use, so as to facilitate everyone and their daily work to consult the use of Because I did not find this blog support attachment u
Tags: visible test current access think analysis grouped spreadsheet rulesOne: Download routeII: Book DrawingThree: Catalogue
The 1th Chapter SQL core1.1 SQL language1.2 Interface of the database1.3 Sql*plus Review1.3.1 Connecting to a database1.3.2 Configuring the Sql*plus environment1.3.3 Execute command1.4 5 Cor
their definition does not paste and be changed. Contention for a latch increases the execution time of the statement and reduces concurrency. Soft parsing any ill-resolved parsing isSoft parsing。 If you submit a statement that is the same as a reusable SQL statement in a shared type, the database reuses that existing code. Reuse code is also known asLibrary Cache Hit。 General, soft parsing is preferable to hard parsing because the database can
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
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
procedures)SQL code
Create procedure Xiaozhengge
@sqlstr nvarchar (4000), --query string
@currentpage int, --page n
@pagesize int --Number of rows per page
As
SET NOCOUNT on
DECLARE @P1 int, --P1 is the ID of the cursor
@rowcount int
EXEC sp_cursoropen @P1 output, @sqlstr, @scrollopt =1, @ccopt =1,@[email protected] output
Select Ceiling (1.0* @rowcount/@pagesize) as total number of pages--, @rowcount as rows, @currentpage
oracle| optimization
1. The statements that have been validated are exactly the same as those already in the shared pool
2. Variable names as consistent as possible
3. Rational use of outer joins
4. Use fewer layers of nesting
5. Multi-use concurrency
The optimization steps for a statement are generally:
1. The SGA area is adjusted so that the SGA area is optimally used.
2. optimization of the SQL statemen
Tags: des blog http io ar os using SP forHttp://www.cnblogs.com/sopost/archive/2010/10/11/2190076.html in the SQL statement optimization process, we often use the hint, now summarize the SQL optimization process common Oracle Usage of hint:1./*+all_rows*/Indicates that the cost-based optimization method is selected for the statement block, and the optimal through
Tags: related CLOB fields Federated recycle real-time Evel further runDynamic performance View V$sql_monitor, which displays SQL statement information for Oracle monitoring. The information in V$sql_monitor and V$sql_plan_monitor will be refreshed in real time, at 1 times per second. Once the SQL statement is executed, the monitoring information will not be delet
Oracle optimization is itself a difficult thing to do and everything involved. Let's talk about my optimization experience (for beginners only):Many of the optimization experiences mentioned in the book include indexes, table structures, scalar queries, and database-level optimizations, but 80% of optimizations can be statement-level optimizations. The optimized objects include: procedure, function, and SQL.For people who are familiar with
1. Log in to PL/SQL DeveloperThis omits the installation steps for the Oracle database and PL/SQL Developer, and note that when you install the PL/SQL Developer software, do not install it under the program Files (x86) directory or you cannot start PL/SQL Developer.Wonder wh
"ora-01555:snapshot too old", if this problem, I will start from the point of view of the system design, why there is such a large query, Why the other transactions in this query will update the data, whether the query is just a check is enough, check the process needs to lock the table and so on. However, this problem can be solved by database tuning, but I think the point of view of the problem is to start from its own system design.
Second, you s
Tags: oracle plsql performance Language SQLThese days to see the Oracle PL/SQL Real-combat this book, out of the study of the performance of the statement, the downstream standard on the impact of the code.1. Progressive processing The program declares a cursor c1, and then implicitly opens the cursor with a cursor for loop, the program queries the Customers tab
: Network Disk DownloadContent IntroductionEditing the volume of information contained in this book can improve your programming skills to a new level. You'll learn how to write dynamic PL/SQL programs and Oracle database interfaces, perform complex computations, and use advanced techniques to control error conditions. In addition, you will receive up-to-date information on Pl/sqltoolkit,java integration an
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 (*), SUM (SAL) from EMP
WHERE dept_no = 0020
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.