インデックスに異なるテーブルスペースを使用する論理的な理由はありますか?

StackOverflow https://stackoverflow.com/questions/1819522

  •  10-07-2019
  •  | 
  •  

質問

こんにちはインデックスとデータ用に異なるテーブルスペースを作成した理由を教えてください。

役に立ちましたか?

解決

インデックスとテーブルを別々のテーブルスペースに保持するとパフォーマンスが向上すると広く信じられています。これは今では多くの立派な専門家によって神話と見なされています(このAsk Tomスレッド-" myth" を検索しますが、古い習慣が激しく死ぬため、今でも一般的な習慣です!

サードパーティの編集

asktomから抽出:" Index Tablespace" 2001年のOracleバージョン8.1.6の質問

  • インデックスを独自のテーブルスペースに保持することはまだ良い考えですか?
  • これはパフォーマンスを向上させますか、それとも回復の問題ですか?
  • 答えはプラットフォームごとに異なりますか?

返信の最初の部分

Yes, no, maybe.

The idea, born in the 1980s when systems were tiny and user counts were in the single 
digits, was that you separated indexes from data into separate tablespaces on different 
disks.

In that fashion, you positioned the head of the disk in the index tablespace and the head 
of the disk in the data tablespace and that would be better then seeking 2 times on the 
same disk.

Drives back then were really slow at seeking and typically measured in the 10's to 100's 
of megabytes (if you were lucky)


Today, with logical volumes, raid, NN gigabyte (nn is rapidly becoming NNN gigabytes) 
drives, hundreds/thousands of concurrent users, thousands of tables, 10's of thousands of 
indexes - this sort of "optimization" is sort of impossible.

What you strive for today is to be able to manage things, to spread IO out evenly 
avoiding hot spots.

Since I believe all things should be in locally managed tablespaces with UNIFORM extent 
sizes, I would say that yes, indexes would be in a different tablespace from the data but 
only because they are a different SIZE then the data.  My table with 50 columns and an 
average row size of 4k might belong in a tablespace that has 5meg extents whereas the 
index on a single number column might belong in a tablespace with 512k or 1m extents.

I tend to keep my indexes separate from the data but for the above sizing reason.  The 
tablespaces frequently end up on the same exact mount points.  You strive for even io 
across your disks and you may end up with indexes and data on the same devices. 

他のヒント

多くのユーザーがいなく、データベースのサイズが大きすぎなかった80年代に意味があります。当時は、インデックスとテーブルを異なる物理ボリュームに保存すると便利でした。

現在、論理ボリュームやRAIDなどがあり、インデックスとテーブルを異なるテーブルスペースに保存する必要はありません。

ただし、すべてのテーブルスペースは均一な拡張サイズでローカルに管理する必要があります。この観点から、インデックスのテーブルスペースが512Kbの拡張サイズで十分な場合、50列のテーブルは5Mbのextedsサイズのテーブルスペースに格納できるため、インデックスは異なるテーブルスペースに格納する必要があります。

  • パフォーマンス。ケースごとに分析する必要があります。 1つのテーブルスペースにすべてをまとめると、もう1つの神話になると思います!十分なスピンドルと十分な回転数を確保し、オペレーティングシステムのキューイングを処理する必要があります。誰かが、1つのテーブルスペースを作成するだけで十分であり、他のすべての要因を考慮せずに多くのテーブルスペースと同じであると考える場合、別の神話を意味します。状況によります!
  • 高可用性。個別のテーブルスペースを使用すると、ファイルの破損、ファイルシステムの破損、ブロックの破損が発生した場合に、システムの高可用性が向上します。インデックステーブルスペースでのみ問題が発生する場合、オンラインでリカバリを実行する必要がありますが、お客様は引き続きアプリケーションを使用できます。参照: http ://richardfoote.wordpress.com/2008/05/02/indexes-in-their-own-tablespace-recoverability-advantages-get-back/
  • インデックス、データ、BLOB、CLOBに個別のテーブルスペースを使用すると、管理性とコストにとって最終的には個々のテーブルが重要になる場合があります。ストレージシステムを使用してBLOB、CLOBを保存し、最終的には異なるサービス品質の異なるストレージレイヤーにアーカイブできます
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top