Label:First, the conceptThe data dictionary is the most important part of the Oracle database, and it provides some system information about the database.The dynamic performance View records information about the startup of the routine. Second, the data dictionary1), the data dictionary records the system Information of the database, which is a collection of read-only tables and views, the owner of the dat
\ RDBMS \ ADMIN \ utlxplan. SQL to create the PLAN_TABLE table)
SQL>SETAUTOTRACEON
SQL>SETTIMINGON
You can use set autotrace on to view the statement execution plan and set timing on to view the statement running time.
SQL>selectcount(*)fromCASE_GA_AJZLZ;
COUNT(*)
346639
Used time: 00: 00: 21.38
According to Oracle's documentation, the data pump in different ways to export imports, performance can be significantly different, this time just have the opportunity to test, migration table space, direct path, external table, and database chain export, import performance differences.
This test external table export, import method.
First clear the user and tablespace imported from the previous article,
a.col1=b.col1)
4. Another useful Script: Find the top 10 SQL statements with poor performance.
SELECT * FROM (select PARSING_USER_ID,EXECUTIONS,SORTS,COMMAND_TYPE,DISK_READS,sql_text FROM v$sqlareaorder BY disk_reads DESC )where ROWNUM
Ii. quickly discover the cause of Oracle server
table space are on different hard disks (this requirement can be achieved by specifying a table space)D, shared SQL statementsIn order not to parse the same SQL statement repeatedly, after the first resolution, Oracle stores the SQL statement in memory, which is a shared pool in the system global area of the SGA Memor
-clustered indexes. See the following SQL statement:
Select count (*) from stuff where id_no in ('0', '1') (23 seconds)
Analysis:The 'in' in THE where condition is logically equivalent to 'or', so the syntax analyzer will set in ('0', '1 ') convert to id_no = '0' or id_no = '1' for execution. We expect that it will find the results separately based on each or clause, and then add the results, so that the in
Label:*sql optimization based on ORACLE11GR2 reading notes * Third, cursor in OracleThe cursor in Oracle is a vector of SQL parsing and execution in an Oracle database and is a data structure for C (Oracle is written in C). There are two types of cursor in an
How to export data and tables from SQL Server and Oracle
1. Export and import data to a database in SQL Server1. Select the database to be transferred in the SQL Server Enterprise Manager, right-click and choose all tasks> back up the database.2. Select database for backup-complete,Target backup to press addEnter a cu
sort. Typically, SQL statements with union, minus, and intersect can be overridden in other ways. If your database sort_area_size well, use union, minus, intersect can also be considered, after all, their readability is very strong
6. Use where to replace having (if applicable)Optimize GROUP BY:
Increase the efficiency of the group BY statement by filtering out unwanted records before group by. The following two queries return the same result but t
gender from users where gender = 'male ', this query is very efficient and the index ix_gender has been successfully used. However, we write less SQL statements like this. For more SQL statements, we can write such as select userid, username, phone, email from users where gender = 'male' then you can look at the query plan and try to use the index ix_gender. Instead, you perform a clustered index scan or t
I. Introduction: the most important part of database adjustment is to rewrite the SQL code with poor running efficiency. The SQL code after rewriting may be significantly different from the previous one in terms of running efficiency!
However, when the performance still fails to break through the bottleneck after rewriting or you are a user (unable to access the
Diagnostic for Java, is a separate product, then slowly by Oracle integration into the EM12C, it is installed on the Java EE Application Server diagnostic tools, The performance information of the application module is analyzed by using the sampling algorithm (Oracle claims that it is not a BCI method-byte-code injection). JVMD can perform live thread parsing wh
sequential access to each record in the table. ORACLE optimizes full table scan by reading multiple data blocks at a time.
B. Access the table through ROWID
You can use ROWID-based access to improve the efficiency of accessing tables. ROWID contains the physical location information recorded in the table .. ORACLE uses indexes to establish a connection between data and the physical location where data is s
Today, we will introduce how to correctly use Oracle SQL Trace and 10046 event to diagnose the performance of Oracle databases, we all know that level over 1 10046 events are often referred to as extended SQL trace, which is usually used to diagnose the
The most important component of Oracle SQL uptime is the time spent preparing new SQL statements for execution. However, if you understand the intrinsic mechanism of the executable plan, you can control the time that Oracle spends in assessing the connection order of the tables and improve the
temporary tablespace. When a user performs database operations, sorting, grouping and summarizing, and indexing are indispensable and generate a large amount of temporary data. Therefore, temporary tablespace is required for each database. If the temporary tablespace is improperly set, the database performance will be greatly affected. Therefore, Administrators cannot take it lightly when maintaining this temporary tablespace. Avoid improper temporar
file to be too large and consumes disk space excessively. Therefore, you can use the truncate operation instead of delete,truncate is not counted into the transaction log, but also without the condition of the deletion, the execution is very fast. Or you can simply drop the table and recreate it, sometimes faster than delete.PS: The two methods of emptying SQL Server log files from the 10thOne way: Empty the log.1. Open Query
filtering out unwanted records before group by. The following two queries return the same result but the second one is significantly faster.The code is as follows:Low efficiency:SELECT JOB, AVG (SAL)From EMP GROUP job has job = ' president ' and AVG (SAL) >xxxEfficient:SELECT JOB, AVG (SAL)From EMPWHERE JOB = ' President 'OR job = ' MANAGER ' GROUP JOB having and AVG (SAL) >xxx7, usually, if the statement can avoid the use of subqueries, as far as possible without sub-query.Because the overhead
High-performance SQL statements can improve the efficiency of the page execution, so that your server run more smoothly, so everyone in the future use of the process, as far as possible to consider the efficiency.(1) integration of simple, unrelated database access:If you have a fewSimple database query statements, you can integrate them into a query (even if they are not related)(2) Delete duplicate record
The time spent preparing new SQL statements is the most important part of the execution time of Oracle SQL statements. However, by understanding the internal execution plan generation mechanism of Oracle, you can control the number of times that Oracle spends evaluating 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.