A brief summary of Oracle Database query performance optimization. Database optimization is always an arduous task. Optimization is particularly important for systems with large data volumes and frequent access. Due to the flexibility, complexity,
Today is. During the database performance tuning process, I suddenly moved to the previous email with the following information:
From the log, it is found that there is a row-level exclusive lock contention, resulting in a deadlock.
Problem
--- Indicates flashing back to the database
--- Use a flashback table to restore the table content to a specific time point in the past
--- Restore from the deleted table
--- Use the flashback query to view the database content at any point in time
-
Drop deletes the structure of the entire table. Transactions cannot be rolled back.
Drop table test;
Truncate deletes all data in the table and does not operate row by row. The transaction cannot be rolled back.
Truncate table test;Delete is for
Oracle:
Definition type (for string segmentation ):
Create or replaceTYPE "STR_SPLIT" is table of VARCHAR2 (4000 );
String segmentation functions:
Create or replaceFUNCTION splitstr (p_string IN VARCHAR2, p_delimiter IN VARCHAR2)RETURN
ORACLE-based application systems have many performance problems, which are caused by poor SQL Performance of application systems. Therefore, SQL Performance optimization is very important, to analyze and optimize the performance of an SQL statement,
I. Shared Server Mode working mechanism:
Shared server mode (also called MTS Multi-Threaded Server ):
After the database is started, there will be two more processes than the dedicated server mode. One is the scheduling process (dispatcher) and the
Introduction: When the typical installed SDE and database cannot achieve the desired efficiency by default, the SDE and database should be reconfigured as needed to achieve satisfactory results.
For example, when a database table is too large, it is
Oracle 11g does not allocate segment to empty tables by default. Therefore, when using exp to export Oracle11g databases, empty tables are not exported. By default, the deferred_segment_creation parameter is TRUE.
After the deferred_segment_creation
Oracle uninstallation is a relatively troublesome task. Unlike other software, we can easily and quickly uninstall the software according to the uninstallation wizard.
Oracle uninstallation involves modifying the registry and restarting the
Oracle patch is also an Oracle patch. Oracle patches include several other types. Small patches are hard to count and are confusing. However, Oracle patches are still sequential. In addition, the opatch tool provided by Oracle is very convenient for
Introduction to Library cache the main function of Library cache is to store SQL statements submitted by users and the parsing tree related to SQL statements (the parsing tree is the presentation of all objects involved in SQL statements ),
Multiple methods for starting or disabling Oracle databases
There are many ways to start and close oracle.
Here, we only provide three methods:
L SQL * plus
L OEM Console
L Windows Console
1. Take SQL * plus as an example:
A. Prepare
First, we use
The title is a bit complicated. In fact, the excel table is imported and exported in the replicel database. Let's take a look at the specific data import method.
ExportFor export, select the query result from the query results in the SQL Window of
Question no: 13
Examine the structure of the EMPLOYEES and NEW_EMPLOYEES tables:
Which MERGE statement is valid?
A. merge into new_employees c USING employees e ON (c. employee_id = e. employee_id) WHEN MATCHED THEN UPDATE SET
Name = e. first_name |
1. query a field already exists.Copy codeThe Code is as follows:Select *From User uWhere u. user_name in (select u. user_nameFrom User uGroup by u. user_name having count (*)> 1)2. Delete repeated fields in the table
For example, a table contains
This is a bit twisted solution, but works. basically you first need to convert LOB (in these example I refer to CLOB, BLOB is similar but you will probably not use varchar2) to multiple varchar2 (4000) on remote server-for example CLOB with size 8100
700. Which two statements are true about a duplicate database that is created by using the DUPLICATE
Command in RMAN? (Choose two .)
A. It is a copy or a subset of the target database.
B. It is opened in RESTRICT mode after a duplicating
684. Your database is running in ARCHIVELOG mode. You have been taking backups of all the data files and control files regularly.
You are informed that some important tables in the BILLING tablespace have been dropped on February 28,200 7 at 10.30
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service