The primary key and index of data are usually required. Especially when a table has a large amount of data, the index and primary key are even more necessary, which can provide data query efficiency;
I. Create a primary key constraint while creating
If your stored procedure is named PROC_RAIN_JM
Write another Stored Procedure named PROC_JOB_RAIN_JM.
Content:
Create Or Replace Procedure PROC_JOB_RAIN_JM
Is
li_jobno Number;
Begin
Recently I am working on a project. In this case, the database currently has three fields, year, month, and day, indicating year, month, and day. Now I need to merge them together, you can use this SQL syntax
To_date (y. year | y. month | y. day,
Recently, I became the loyal fans of linus, And the linux lady was handsome. I found the feeling of Character Control. Installing linux in Oracle was a tough task, it took two days for free time. Share with you.
First of all, it is a Linux package.
Limit and offset are usually used together with order. Indexes are helpful for sorting and comparison,
If no index is available, a large number of files are sorted. Therefore, you must add an index to the order by column.
If:
Select * from
1. Name, size, used size, unused size, used percentage, unused percentage
Select tablespace_name, sum (totalM), sum (usedM), sum (remainedM ),Sum (usedM)/sum (totalM) * 100, sum (remainedM)/sum (totalM) * 100From(Select B. file_id, B.
Checkpoint Process: triggers the checkpoint, synchronizes data on the memory hard disk, writes the system change number to the control file and data file, and triggers the dbwr process to write the cached data to the database.
The lgwr process is
1. Write Java
2. Use loadjava to import the database. loadjava is under $ Oracle_HOME/bin.
Loadjava-u /@-resolve-v
This method loads sourcecode into the database.
If you have previously loaded the same java program, you must first drop
Dropjava-u /@
// % Type// If the declared variable is directly mapped to a column in the database, you can use the % type keyword to map the variable// Pin the column. What are the benefits of doing so?// For example:// Declare v_ename scott. emp. ename % type;//
// Problem:CI MSISDN CNT18802 1300906019518830 13009060195 118837 13009060195 218829 13009063333 518830 13009063333 718847 13009063333 4// Result:CI MSISDN CNT18802 1300906019518830 13009063333 7// This problem is to query the cnt of the same msisdn
// Rownum is a pseudo column. It is the number automatically assigned to each row in the query result by the Oracle system. The first row is 1, the second row is 2, and so on ....// An oracle page, which must contain at least three layers (unless
1. Correct Use of Indexes
In a massive data table, each table has one or more indexes to ensure efficient query. In the ETL process, indexes must follow the following principles:
(1) When the inserted data is more than 10% records in the data table,
Previously, the entire database was backed up, but because a table was accidentally deleted, the accidentally deleted table needs to be restored from the backup. If you directly import the dmp file, it takes a long time because the data volume is
Set newpage none heading off space 0 PAGESIZE 0 trimout on trimspool on linesize 2500 colsep | feedback off termout off pages 0Set colsep |Alter session set nls_date_format = 'yyyy-mm-dd hh24: mi: ss ';Spool deltab. SQLSelect 'truncate table' |
I recently started writing the stored procedure. There is a requirement that the database table has a field (20-bit serial number, which may contain characters, and the last 7 digits are numbers ), this field must be calculated based on the quantity.
The SQL interface is used to query redo logs.
Purpose:1. You can use LogMiner to recover the deleted data by mistake. Although you can also use RMAN to recover the data, it is troublesome to transfer the data and query the data before using the
Although the Oracle system has already provided several techniques for tuning system performance, if the database design itself is problematic, especially in terms of structure, what can you do if you have the power to do? Therefore, it is
1. Instructions
Oracle Data is placed in the table, and the table segment (segment) is composed of extents, and extents is composed of Blocks. Each block can store multiple rows.
OracleSGA is composed of a DB buffer cache, which consists of default,
I. Bug issue performance
The CPU usage is 100%. vmstat displays a large number of pending processes and context switches. The sqlplus and lsnrctl commands are invalid. The data is basically hang. Nothing can be used.
This bug exists with Oracle 10.2.
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