Oracle performance optimization (SQL) uses the IN operator as few as possible. Basically, all IN operators can be replaced by EXISTS. You can use not exists or external join + instead of the not in operator. When Oracle executes the IN subquery, it first executes the subquery, puts the query result into a temporary tab
executed. Obviously, the real plan is more accurate because it runs queries on the database physically. However, this method may not be the best choice for queries with huge system loads and/or long-term queries. In typical cases, when I think a specific query has a problem, or if I expect a query to be called frequently enough in the application to cause performance problems, I will run this tool.You can enter the
The ORACLE tutorial is: Oracle SQL Performance Optimization Series III. 8. Use the DECODE function to reduce processing timeYou can use the DECODE function to avoid repeated scan of the same record or join the same table.For example:Select count (*), SUM (SAL) FROM EMPWHERE DEPT_NO = 0020And ename like 'Smith % ';Selec
1,sql Types of ParseSQL Parse is usually divided into hard parsing and soft parsing, and when SQL is executed for the first time, hard parsing occurs, and then execution is performed if the shared pool Can be found in the soft analysis. Therefore, to improve the performance of the data, it is possible to have SQL exec
oracle| Performance | optimization
4. Select the most efficient table name order (valid only in the Rule-based optimizer)
The Oracle parser processes the table names in the FROM clause in Right-to-left order, so the last table in the FROM clause (the underlying table driving tables) is processed first. In cases where multiple tables are included in the FROM clau
Find the top 10 poor performance SQL.SELECT * from (SelectfromorderbyDESC ) where ROWNUMView a running session with a large IOSELECTSE.SID,SE.SERIAL#,PR. Spid,se.username,se.status, Se.terminal,se.program,se. Module,se.sql_address,st.event,st. P1text,si.physical_reads, Si.block_changes fromv$session Se,v$session_wait St, v$sess_io si,v$process PRWHERESt.sid=Se.sid andSt. Sid=Si.sid andSe. Paddr=pr. ADDR andSe.sid>6 andSt. Wait_time=0 andSt.event no
oracle| Performance | optimization
13. Counting the number of record bars
Contrary to general opinion, COUNT (*) is slightly faster than count (1), although the count of indexed columns is still the fastest if indexed retrieval is possible. such as COUNT (EMPNO)
(Translator: In the CSDN forum, there has been quite a heated discussion, the author's point of view is not very accurate, through the actual
Oracle Log Analyzer Tool Logminer use
1. Set Date format
Alter system set nls_date_format= ' Yyyy-mm-dd hh24:mi:ss ' scope=spfile;
Select To_char (sysdate, ' Yyyy-mm-dd hh24:mi:ss ') from dual;
2. Add Supplemental Log
If the database needs to use Logminer, it should be added, only after this log is added to capture DML
ALTER DATABASE ADD Supplemental LOG DATA (PRIMARY KEY, UNIQUE INDEX) COLUMNS;
3. O
How Does Oracle view the execution plan of an SQL statement based on the dynamic performance view?
How Does Oracle view the execution plan of an SQL statement based on the dynamic performance view?
1. Authorize a user to view
graphical interface, it is not easy to use, and after installation, Windows can not be separated from the domain environment, and not the server version of Windows can not run Paralle Job. Depressed.
After two days of trial, put down temporarily. Microsoft's ease of use is more appealing to me than its powerful features. Try SSIS in SQL Server 2005, known as Enterprise-class ETL.
After a use, did not want to really a bit like it, from the introduct
The former is easy to locate. All operating systems allow us to look at CPU-intensive tasks. These tasks can be traced back to a specific user, a specific application module. CPU-intensive modules are generally caused by poor code and/or structure, rather than poor performance SQL. Once you've identified the module, you have to try to make it more efficient. One possible solution is to take some processing
1. Select an appropriate ORACLE OptimizerThere are three Optimizer types in ORACLE:A. RULE (RULE-based) B. COST (COST-based) c. CHOOSE (selectivity)Set the default Optimizer. various declarations of the OPTIMIZER_MODE parameter in the ora file, such as RULE, COST, CHOOSE, ALL_ROWS, FIRST_ROWS. of course, you also overwrite SQL statements or sessions.To use the Cost-Based Optimizer (CBO, Cost-Based Optimizer
[Oracle] a case of increasing SQL Performance by adding local partition indexes received help from colleagues today, saying that a select query would take more than one minute on Oracle, he hopes to get results within 5s. The SQL statement is as follows: [
Alibaba Cloud SQL Intelligent Query analyzer, a database query and analysis management tool developed by delphi.
To facilitate your work, you can use a database query and analysis management tool developed by delphi to share with you the following features:
1. Due to the use of ADO connections, it theoretically supports all databases, such as SQL Server, Acce
oracle| Performance | optimization
17. Use table alias (alias)
When you connect multiple tables in an SQL statement, use the alias of the table and prefix the alias with each column. This allows you to reduce parsing time and reduce syntax errors caused by column ambiguity.
(Translator Note: column ambiguity means that because different tables in
Oracle Performance Analysis 10: Re-indexing-common SQL
The previous section describes the causes and methods for re-indexing. This section describes several common SQL statements and stored procedures.Query all invalid global indexes
select index_name, status from user_indexes where table_name = upper(table_name) an
plan after the query is executed. Obviously, the real plan is more accurate because it is physically running the query on the database. However, this approach may not be the best choice for a large and/or long-term system load query. In a typical case, I run this tool when I think a particular query is having a problem, or if I expect a query to be called frequently enough in the application so that it can cause performance problems.
You can view the
Tags: process optimizer consolidation requires merging auto overwrite session accessThe full execution order of the SELECT statement:The full execution order of the SQL SELECT statement: 1. The FROM clause assembles data from different data sources; 2. The WHERE clause filters the record rows based on the specified criteria, 3, the GROUP BY clause divides the data into multiple groupings, 4, uses the aggregation function for the calculation, 5, uses t
Oracle SQL Performance Optimization(1) Select the most efficient table name order (valid only in the rule-based optimizer):The Oracle parser processes the table names in the FROM clause in a right-to-left order, and the FROM clause is written in the final table (the underlying table, driving tables) will be processed
Tag: NiO solves the back sum lead reading post must be synthesizedOracle SQL Performance Optimization(1)Select the most efficient table name order (valid only in the rule-based optimizer):The Oracle parser processes the table names in the FROM clause in a right-to-left order, and the FROM clause is written in the final table (the underlying table, driving tables)
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.