목차
Using Conventional Inserts to Load Tables
데이터 베이스 MySQL 튜토리얼 Conventional-pathinsert(传统路径插入)

Conventional-pathinsert(传统路径插入)

Jun 07, 2016 pm 04:06 PM

前面我们已经说过了Direct-path INSERT,现在来说一下ConventionalINSERT。文章来源Oracle? Database Administrator's Guide11 g Release 2 (11.2)” Conventional and Direct-Path INSERT You can use the INSERT statement to insert data into a table, p

前面我们已经说过了Direct-path INSERT,现在来说一下Conventional INSERT。文章来源"Oracle? Database Administrator's Guide11g Release 2 (11.2)”

Conventional and Direct-Path INSERT

You can use the INSERT statement to insert data into a table, partition, or view in two ways: conventional INSERT and direct-path INSERT. When you issue a conventional INSERT statement, Oracle Database reuses free space in the table into which you are inserting and maintains referential integrity constraints. With direct-pathINSERT, the database appends the inserted data after existing data in the table. Data is written directly into data files, bypassing the buffer cache. Free space in the existing data is not reused. This alternative enhances performance during insert operations and is similar to the functionality of the Oracle direct-path loader utility, SQL*Loader. When you insert into a table that has been created in parallel mode, direct-pathINSERT is the default.

##向表,分区或者视图中插入数据,我们可以使用传统路径插入和直接路径插入两种方式。

当使用传统路径插入方式时,数据库会利用目标表中空闲空间(插入时会扫描高水位线以下,如果有空闲空间就利用,如果没有空闲空间就扩展),并且在插入过程中会维护引用的完整性约束。

当使用直接路径插入时,使用高水位线之上的块。数据绕过buffer cache被直接写入数据文件。目标表中空间空间不被使用。direct-pathINSERT的功能同direct-path loader单元SQL*Loader相似,可以提高insert操作的性能。

当你向一个并行表中插入数据时,默认使用direct-pathINSERT方式。

The manner in which the database generates redo and undo data depends in part on whether you are using conventional or direct-pathINSERT:

##数据库日志产生的方式一定程度上取决于你是使用传统路径还是直接路径查收

Conventional INSERT always generates maximal redo and undo for changes to both data and metadata, regardless of the logging setting of the table and the archivelog and force logging settings of the database.##不论表是否设置了logging模式,数据库是否启用了force logging,数据库是否启用了归档,传统路径插入方式总是会为数据好元数据的变化产生大量的redo和undo

Direct-path INSERT generates both redo and undo for metadata changes, because these are needed for operation recovery. For data changes, undo and redo are generated as follows:##直接路径插入会为元数据的改变而产生redo和undo,因为这些是进行恢复所需要的信息。对于数据的变化,其所产生的redo和undo根据下面的条件来决定:

Direct-path INSERT always bypasses undo generation for data changes.##直接路径插入不会产生undo(因为不需要靠undo来回滚)

If the database is not in ARCHIVELOG or FORCE LOGGING mode, then no redo is generated for data changes, regardless of the logging setting of the table. ##如果数据库没有被设置成归档模式,也没有被设置成force logging模式,那么不会为数据的变化产生日志,除非目标表设置了logging模式

If the database is in ARCHIVELOG mode (but not in FORCE LOGGING mode), then direct-path INSERT generates data redo for LOGGING tables but not for NOLOGGING tables.##如果被设置为归档模式,但是没有被设置我force logging,那么直接路径插入会为指定了logging的表的数据变化产生日志,如果表没有指定logging那么就不产生日志

If the database is in ARCHIVELOG and FORCE LOGGING mode, then direct-path SQL generate data redo for both LOGGING and NOLOGGING tables.##如果数据库处于归档模式,并且设置了force logging,那么不论表是否指定了logging属性,直接路径插入都会为数据变化产生日志

Direct-path INSERT is subject to a number of restrictions. If any of these restrictions is violated, then Oracle Database executes conventional INSERT serially without returning any message, unless otherwise noted:

##Direct-path INSERT有如下一些限制。如果符合下面任何一条,那么数据库会在不给任何反馈信息的情况下自动的采用串行传统路径插入

You can have multiple direct-path INSERT statements in a single transaction, with or without other DML statements. However, after one DML statement alters a particular table, partition, or index, no other DML statement in the transaction can access that table, partition, or index.##

Queries that access the same table, partition, or index are allowed before the direct-pathINSERT statement, but not after it.

If any serial or parallel statement attempts to access a table that has already been modified by a direct-pathINSERT in the same transaction, then the database returns an error and rejects the statement.

The target table cannot be of a cluster.

The target table cannot contain object type columns.

Direct-path INSERT is not supported for an index-organized table (IOT) if it is not partitioned, if it has a mapping table, or if it is reference by a materialized view.

Direct-path INSERT into a single partition of an index-organized table (IOT), or into a partitioned IOT with only one partition, will be done serially, even if the IOT was created in parallel mode or you specify theAPPEND or APPEND_VALUES hint. However, direct-path INSERT operations into a partitioned IOT will honor parallel mode as long as the partition-extended name is not used and the IOT has more than one partition.

The target table cannot have any triggers or referential integrity constraints defined on it.

The target table cannot be replicated.

A transaction containing a direct-path INSERT statement cannot be or become distributed.

You cannot query or modify direct-path inserted data immediately after the insert is complete. If you attempt to do so, anORA-12838 error is generated. You must first issue a COMMIT statement before attempting to read or modify the newly-inserted data.

See Also:

Oracle Database Administrator's Guide for a more complete description of direct-pathINSERT

Oracle Database Utilities for information on SQL*Loader

Oracle Database Performance Tuning Guide for information on how to tune parallel direct-pathINSERT

Using Conventional Inserts to Load Tables

During conventional INSERT operations, the database reuses free space in the table, interleaving newly inserted data with existing data. During such operations, the database also maintains referential integrity constraints. Unlike direct-path INSERT operations, conventional INSERT operations do not require an exclusive lock on the table.

Several other restrictions apply to direct-path INSERT operations that do not apply to conventionalINSERT operations. See Oracle Database SQL Language Reference for information about these restrictions.

You can perform a conventional INSERT operation in serial mode or in parallel mode using theNOAPPEND hint.

The following is an example of using the NOAPPEND hint to perform a conventionalINSERT in serial mode:

INSERT /*+ NOAPPEND */ INTO sales_hist SELECT * FROM sales WHERE cust_id=8890;
로그인 후 복사

The following is an example of using the NOAPPEND hint to perform a conventionalINSERT in parallel mode:

INSERT /*+ NOAPPEND PARALLEL */ INTO sales_hist
   SELECT * FROM sales;
로그인 후 복사

To run in parallel DML mode, the following requirements must be met:

You must have Oracle Enterprise Edition installed.

You must enable parallel DML in your session. To do this, submit the following statement:

ALTER SESSION { ENABLE | FORCE } PARALLEL DML;
로그인 후 복사

You must meet at least one of the following requirements:

Specify the parallel attribute for the target table, either at create time or subsequently

Specify the PARALLEL hint for each insert operation

Set the database initialization parameter PARALLEL_DEGREE_POLICY toAUTO

본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

AI Hentai Generator

AI Hentai Generator

AI Hentai를 무료로 생성하십시오.

인기 기사

R.E.P.O. 에너지 결정과 그들이하는 일 (노란색 크리스탈)
3 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. 최고의 그래픽 설정
3 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. 아무도들을 수없는 경우 오디오를 수정하는 방법
3 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25 : Myrise에서 모든 것을 잠금 해제하는 방법
4 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌

뜨거운 도구

메모장++7.3.1

메모장++7.3.1

사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전

SublimeText3 중국어 버전

중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기

스튜디오 13.0.1 보내기

강력한 PHP 통합 개발 환경

드림위버 CS6

드림위버 CS6

시각적 웹 개발 도구

SublimeText3 Mac 버전

SublimeText3 Mac 버전

신 수준의 코드 편집 소프트웨어(SublimeText3)

Windows 11에서 테마는 어디에 있나요? Windows 11에서 테마는 어디에 있나요? Aug 01, 2023 am 09:29 AM

Windows 11에는 다양한 테마와 배경 화면을 포함하여 수많은 사용자 지정 옵션이 있습니다. 이러한 테마는 그 자체로 미학적이지만 일부 사용자는 여전히 Windows 11의 배경에서 이 테마가 어디에 있는지 궁금해합니다. 이 가이드에서는 Windows 11 테마의 위치에 액세스하는 다양한 방법을 보여줍니다. Windows 11 기본 테마는 무엇입니까? Windows 11의 기본 테마 배경은 하늘색 배경에 피는 추상 감청색 꽃입니다. 이 배경은 운영 체제 출시 전의 기대 덕분에 가장 인기 있는 배경 중 하나입니다. 그러나 운영 체제에는 다양한 다른 배경도 함께 제공됩니다. 따라서 언제든지 Windows 11 바탕 화면 테마 배경을 변경할 수 있습니다. 테마는 Windo에 저장됩니다.

파일 경로에서 슬래시와 백슬래시의 다양한 용도 파일 경로에서 슬래시와 백슬래시의 다양한 용도 Feb 26, 2024 pm 04:36 PM

파일 경로는 운영 체제에서 파일이나 폴더를 식별하고 찾는 데 사용되는 문자열입니다. 파일 경로에는 경로를 구분하는 두 가지 공통 기호, 즉 슬래시(/)와 백슬래시()가 있습니다. 이 두 기호는 운영 체제에 따라 용도와 의미가 다릅니다. 슬래시(/)는 Unix 및 Linux 시스템에서 일반적으로 사용되는 경로 구분 기호입니다. 이러한 시스템에서 파일 경로는 루트 디렉터리(/)에서 시작하고 각 디렉터리 사이를 슬래시로 구분합니다. 예를 들어 /home/user/Docume 경로는 다음과 같습니다.

오류 수정 방법: Java에서 기본 클래스를 찾을 수 없거나 로드할 수 없습니다. 오류 수정 방법: Java에서 기본 클래스를 찾을 수 없거나 로드할 수 없습니다. Oct 26, 2023 pm 11:17 PM

기술적인 오류로 인해 영상을 재생할 수 없습니다. (오류 코드: 102006) 이 가이드는 이러한 일반적인 문제에 대한 간단한 수정 사항을 제공하고 코딩 여정을 계속합니다. 또한 Java 오류의 원인과 향후 이를 방지하는 방법에 대해서도 논의하겠습니다. Java에서 "오류: 기본 클래스를 찾을 수 없거나 로드되지 않음"이란 무엇입니까? Java는 개발자가 다양한 응용 프로그램을 만들 수 있는 강력한 프로그래밍 언어입니다. 그러나 다양성과 효율성에는 개발 중에 발생할 수 있는 일반적인 실수가 많이 있습니다. 인터럽트 중 하나는 오류: 기본 클래스 user_jvm_args.txt를 찾을 수 없거나 로드되지 않음입니다. 이는 JVM(Java Virtual Machine)이 프로그램을 실행할 기본 클래스를 찾을 수 없을 때 발생합니다. 이 오류는 다음과 같은 경우에도 장벽 역할을 합니다.

Win11에서 '내 컴퓨터' 경로의 차이점은 무엇입니까? 빨리 찾는 방법! Win11에서 '내 컴퓨터' 경로의 차이점은 무엇입니까? 빨리 찾는 방법! Mar 29, 2024 pm 12:33 PM

Win11에서 "내 컴퓨터" 경로의 차이점은 무엇입니까? 빨리 찾는 방법! Windows 시스템이 지속적으로 업데이트됨에 따라 최신 Windows 11 시스템도 몇 가지 새로운 변경 사항과 기능을 제공합니다. 일반적인 문제 중 하나는 사용자가 Win11 시스템에서 "내 컴퓨터"에 대한 경로를 찾을 수 없다는 것입니다. 이는 일반적으로 이전 Windows 시스템에서는 간단한 작업이었습니다. 이 기사에서는 Win11 시스템에서 "내 컴퓨터"의 경로가 어떻게 다른지, 그리고 이를 빠르게 찾는 방법을 소개합니다. Windows1에서

Linux 커널 소스 코드 저장 경로 분석 Linux 커널 소스 코드 저장 경로 분석 Mar 14, 2024 am 11:45 AM

Linux 커널은 소스 코드가 전용 코드 저장소에 저장되어 있는 오픈 소스 운영 체제 커널입니다. 이번 글에서는 리눅스 커널 소스코드의 저장 경로를 자세히 분석하고, 독자들의 이해를 돕기 위해 구체적인 코드 예시를 활용하겠습니다. 1. Linux 커널 소스 코드 저장 경로 Linux 커널 소스 코드는 linux라는 Git 저장소에 저장되어 있으며, 이 저장소는 [https://github.com/torvalds/linux](http://github.com/torvalds/linux)에서 호스팅됩니다.

Linux 시스템에서 RPM 파일의 저장 경로를 찾는 방법은 무엇입니까? Linux 시스템에서 RPM 파일의 저장 경로를 찾는 방법은 무엇입니까? Mar 14, 2024 pm 04:42 PM

Linux 시스템에서 RPM(RedHatPackageManager)은 소프트웨어 패키지를 설치, 업그레이드 및 삭제하는 데 사용되는 일반적인 소프트웨어 패키지 관리 도구입니다. 검색이나 기타 작업을 위해 설치된 RPM 파일의 저장 경로를 찾아야 하는 경우가 있습니다. 다음은 Linux 시스템에서 RPM 파일의 저장 경로를 찾는 방법을 소개하고 구체적인 코드 예시를 제공합니다. 먼저 rpm 명령을 사용하여 설치된 RPM 패키지와 해당 저장 경로를 찾을 수 있습니다. 열려 있는

os.path 모듈을 사용하여 Python 3.x에서 파일 경로의 다양한 부분을 얻는 방법 os.path 모듈을 사용하여 Python 3.x에서 파일 경로의 다양한 부분을 얻는 방법 Jul 30, 2023 pm 02:57 PM

Python3.x에서 os.path 모듈을 사용하여 파일 경로의 다양한 부분을 얻는 방법 일상적인 Python 프로그래밍에서는 파일 이름, 파일 디렉터리, 확장자 등을 얻는 등 파일 경로에 대한 작업이 필요한 경우가 많습니다. 경로의. Python에서는 os.path 모듈을 사용하여 이러한 작업을 수행할 수 있습니다. 이 기사에서는 더 나은 파일 조작을 위해 os.path 모듈을 사용하여 파일 경로의 다양한 부분을 얻는 방법을 소개합니다. os.path 모듈은 일련의 기능을 제공합니다.

path/filepath.Dir 함수를 사용하여 파일 경로의 디렉터리 부분을 가져옵니다. path/filepath.Dir 함수를 사용하여 파일 경로의 디렉터리 부분을 가져옵니다. Jul 27, 2023 am 09:06 AM

path/filepath.Dir 함수를 사용하여 파일 경로의 디렉터리 부분을 얻으세요. 일상적인 개발 프로세스에서는 파일 경로 처리가 종종 포함됩니다. 때로는 파일 경로의 디렉터리 부분, 즉 파일이 있는 폴더의 경로를 가져와야 하는 경우가 있습니다. Go 언어에서는 path/filepath 패키지에서 제공하는 Dir 함수를 사용하여 이 함수를 구현할 수 있습니다. Dir 함수의 서명은 다음과 같습니다: funcDir(pathstring)string Dir 함수는 단어를 받습니다.

See all articles