Conventional-pathinsert(传统路径插入)
前面我们已经说过了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

ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

Video Face Swap
完全無料の AI 顔交換ツールを使用して、あらゆるビデオの顔を簡単に交換できます。

人気の記事

ホットツール

メモ帳++7.3.1
使いやすく無料のコードエディター

SublimeText3 中国語版
中国語版、とても使いやすい

ゼンドスタジオ 13.0.1
強力な PHP 統合開発環境

ドリームウィーバー CS6
ビジュアル Web 開発ツール

SublimeText3 Mac版
神レベルのコード編集ソフト(SublimeText3)

ホットトピック











Windows 11 には、さまざまなテーマや壁紙など、非常に多くのカスタマイズ オプションがあります。これらのテーマはそれなりに美しいものですが、Windows 11 のバックグラウンドでどのような位置にあるのか疑問に思うユーザーもいます。このガイドでは、Windows 11 テーマの場所にアクセスするさまざまな方法を説明します。 Windows 11 のデフォルトのテーマとは何ですか? Windows 11 のデフォルトのテーマの背景は、空色の背景に咲く抽象的なロイヤル ブルーの花です。この背景は、オペレーティング システムのリリース前の期待のおかげで、最も人気のあるものの 1 つです。ただし、オペレーティング システムには他のさまざまな背景もあります。したがって、Windows 11 デスクトップのテーマの背景はいつでも変更できます。テーマは Windo に保存されます

ファイル パスは、ファイルまたはフォルダーを識別して検索するためにオペレーティング システムによって使用される文字列です。ファイル パスには、パスを区切る 2 つの一般的な記号、つまりスラッシュ (/) とバックスラッシュ () があります。これら 2 つのシンボルは、オペレーティング システムごとに異なる用途と意味を持ちます。スラッシュ (/) は、Unix および Linux システムで一般的に使用されるパス区切り文字です。これらのシステムでは、ファイル パスはルート ディレクトリ (/) から始まり、各ディレクトリ間はスラッシュで区切られます。たとえば、パス /home/user/Document

技術的なエラーのため、このビデオは再生できません。 (エラー コード: 102006) このガイドでは、この一般的な問題に対する簡単な修正を提供し、コーディング作業を続行します。また、Java エラーの原因と、今後それを防ぐ方法についても説明します。 Java の「エラー: メインクラスが見つからないかロードされていません」とは何ですか? Java は、開発者が幅広いアプリケーションを作成できる強力なプログラミング言語です。ただし、その多用途性と効率性には、開発中に発生する可能性のある多くの一般的な間違いが伴います。割り込みの 1 つは、「エラー: メイン クラス user_jvm_args.txt が見つからないかロードされていません」です。これは、Java 仮想マシン (JVM) がプログラムを実行するメイン クラスを見つけられない場合に発生します。このエラーは、次の場合でも障害として機能します。

Win11 の「マイ コンピュータ」パスの違いは何ですか?すぐに見つけられる方法! Windows システムは常に更新されているため、最新の Windows 11 システムにもいくつかの新しい変更と機能が追加されています。よくある問題の 1 つは、Win11 システムでユーザーが「マイ コンピューター」へのパスを見つけられないことですが、これは通常、以前の Windows システムでは簡単な操作でした。この記事では、Win11 システムでの「マイ コンピュータ」のパスの違いと、それらをすばやく見つける方法を紹介します。 Windows1の場合

path/filepath.Dir 関数を使用して、ファイル パスのディレクトリ部分を取得します。日常の開発プロセスでは、ファイル パスの処理が頻繁に行われます。場合によっては、ファイル パスのディレクトリ部分、つまりファイルが存在するフォルダーへのパスを取得する必要があります。 Go 言語では、path/filepath パッケージによって提供される Dir 関数を使用してこの関数を実装できます。 Dir 関数のシグネチャは次のとおりです。 funcDir(pathstring)string Dir 関数は単語を受け取ります。

Linux カーネルは、ソース コードが専用のコード リポジトリに保存されているオープン ソース オペレーティング システム カーネルです。この記事では、Linux カーネル ソース コードのストレージ パスを詳細に分析し、読者の理解を助けるために具体的なコード例を使用します。 1. Linux カーネル ソース コードの保存パス Linux カーネル ソース コードは、[https://github.com/torvalds/linux](http) でホストされている linux という Git リポジトリに保存されます。

Python3.x の os.path モジュールを使用してファイル パスのさまざまな部分を取得する方法 日常の Python プログラミングでは、ファイル名、ファイル ディレクトリ、拡張子などの取得など、ファイル パスを操作する必要があることがよくあります。パスの。 Python では、os.path モジュールを使用してこれらの操作を実行できます。この記事では、ファイル操作を改善するために、os.path モジュールを使用してファイル パスのさまざまな部分を取得する方法を紹介します。 os.path モジュールは、一連の

Linux システムでは、RPM (RedHatPackageManager) は、ソフトウェア パッケージのインストール、アップグレード、削除に使用される一般的なソフトウェア パッケージ管理ツールです。検索やその他の操作のために、インストールされている RPM ファイルのストレージ パスを見つける必要がある場合があります。以下では、Linux システムで RPM ファイルの保存パスを見つける方法と、具体的なコード例を紹介します。まず、rpm コマンドを使用して、インストールされている RPM パッケージとそのストレージ パスを見つけます。開ける
