SQL optimization should be adjusted from five aspects:1. Remove unnecessary full table scans for large tables2. cache full table scan for small tables3. Verify the use of optimized Indexes4. Verify the optimized Connection Technology5. minimize the Cost of the Execution Plan
SQL statement:Is the only way to operate databases (data;70% ~ 90% of database resources; independent of the program design logic, com
I've seen a private message recently. I asked some optimization questions for Oracle SQL, shared an article about SQL optimization, and later shared some more articles about SQL optimization.(1) Select the most efficient table name order (valid only in the rule-based optimizer):The
requires sorting, totals, and so on. If you can limit the number of records through the WHERE clause, you can reduce this overhead. (Non-Oracle) on, where, have the three clauses that can be added conditionally, on is the first execution, where the second, having the last, because on is the non-qualifying records filtered before the statistics, it can reduce the intermediate operation to process the data, It should be said that the speed is the faste
dictionary, which means more time is spent(4)Reduce access to the database: Oracle has done a lot of work internally: Parsing SQL statements, estimating index utilization, binding variables, reading data blocks, and more;(5)The ArraySize parameter is reset in Sql*plus, Sql*forms, and pro*c to increase the amount of da
requires sorting, totals, and so on. If you can limit the number of records through the WHERE clause, you can reduce this overhead. (Non-Oracle) on, where, have the three clauses that can be added conditionally, on is the first execution, where the second, having the last, because on is the non-qualifying records filtered before the statistics, it can reduce the intermediate operation to process the data, It should be said that the speed is the faste
processing requires sorting, totals, and so on. If you can limit the number of records through the WHERE clause, you can reduce this overhead. (Non-Oracle) on, where, have the three clauses that can be added conditionally, on is the first execution, where the second, having the last, because on is the non-qualifying records filtered before the statistics, it can reduce the intermediate operation to process the data, It should be said that the speed i
RAC special problems and combat experience (V)
Overview: write down the original intent and motivation of this document, derived from the Oracle Basic operating Manual of the previous article. The Oracle Basic Operations Manual is a summary of the author's vacation on Oracle's foundational knowledge learning. Then form a summary of the system, a review review, the other is easy to use. This documen
For a while, I was confused about Oracle multi-table queries. The reason is that Oracle's own syntax is mixed with SQL's international standard syntax. ThisArticleIt is only suitable for Oracle cainiao, and old birds fly directly... Multi-Table connection type (SQL 1999 standard)
•Cross joins
•Natural
-based optimizer is used.All_rows: cost-based optimizer is always used, and the goal is to obtain the optimal throughput.First_rows_n: always uses the cost-based optimizer to obtain the optimal response time for the first n rows ("N" can be 100, 1000, or) returned.First_rows: used for backward compatibility. The combination of cost and test methods can be used to quickly transmit the first few rows.Rule: Always use rule-based Optimizer3. Use the database features to obtain Processing Statistics
/oracle/database/response/dbca.rsp Check the instance process after the database is built: [Email protected] ~]$ ps-ef | grep ora_ | grep-v grep To view the listening status: [Email protected] ~]$ lsnrctl status Login to view instance status: [Email protected] ~]$ sqlplus/as sysdba Sql> select status from V$instance; Vi. Oracle Boot-up settingsHttp://jingyan.b
records, allowing subsequent conditional processing to handle as few records as possible) 3. Avoid using "*" in the SELECT clause During the parsing process, Oracle converts * once to all column names, which is done by querying the data dictionary, which means more time is spent 4, reduce the number of access to the database Oracle has done a lot of work internally: Parsing
the expression. The core problem of optimization is to minimize the amount of data involved in the processing of the tables in the query, thus achieving the goal of optimizing time and space. 2 Principles of Join query optimization 2.1 Use single-table operation as much as possible Given three relationship patterns: (example below) S (sno,sname,sec,birthday,email) C (Cno,cname,creadit,tname) SC (Sno,cno,score) Example: Query 1001 students to take the course results. Analysis: In this qu
Oracle Installation text tutorial in linux environment in VMware (2) upgrade patch installation in ORACLE 10.2.05, vmware10.2.05
First, decompress the package.
$ unzip p8202632_10205_LINUX.zip
After decompression, we will find an extra folder, Which is Disk1 and enters Disk1. Then execute the installation:
$ ./runInstaller
Execute scripts
# /u01/app/
Tags: des io ar using SP java for on dataVery good SQL statement optimization 34 article1) 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 first, and in the case where the FROM cl
Oracle SQL Performance Optimization
(1) select the most efficient table name sequence (only valid in the rule-based Optimizer ):
The ORACLE parser processes the table names in the FROM clause in the order FROM right to left. The table written in the FROM clause (basic table driving table) will be processed first, when the FROM clause contains multiple tables, You
Website construction tutorial (7): SQL Elementary tutorial tip: SQL is a standard computer language for accessing and processing databases.
SQL is a standard computer language used to access and process databases.
Use SQL to mana
Tags: des style io ar using SP for on fileI myself is a beginner of Oracle and SQL, some time ago saw Hanshunping Teacher's Oracle Video tutorial, feel very easy to learn, a lot of harvest. At the same time he also made a lot of notes, now want to put paper notes in their own words summed up. As the saying goes: teachi
:
SELECT * FROM (
select Z.type, Z.code, Row_number () over
(PARTITION by Z.type Order by Z.code) as code_id
Group_info z
)
WHERE code_id = 1;
Here the Over () is the Oracle analysis function
Refer to SQL Reference documentation:
Analytic functions compute a aggregate value based on a group of rows. They differ from aggregate functions in, They return multiple rows for each group.Analytic
Tags: Oracle 11g installation Diagram Oracle database tutorial Oracle installation Oracle Video tutorial Oracle Tutorial1. After completing this chapter, the
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.