1 / 10

OLAP ( TPC-H )を考慮した R*-Tree での Join について

OLAP ( TPC-H )を考慮した R*-Tree での Join について. 2002/9/11 笹栗茂. 現状. クラスタリング制御の Join への影響を調査するため部分空間 DFRJ を実装中 部分空間 Join における交差領域を減らす手法について考察中. クラスタリング制御の Join への影響. ②. D. ⑤. 主キーの重要度を高くする. ③. 3. A. ⑥. ④. 1. ①. C. Join. 4. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 2. B.

jania
Download Presentation

OLAP ( TPC-H )を考慮した R*-Tree での Join について

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. OLAP(TPC-H)を考慮したR*-Tree でのJoinについて 2002/9/11 笹栗茂

  2. 現状 • クラスタリング制御のJoinへの影響を調査するため部分空間DFRJを実装中 • 部分空間Joinにおける交差領域を減らす手法について考察中

  3. クラスタリング制御のJoinへの影響 ② D ⑤ • 主キーの重要度を高くする ③ 3 A ⑥ ④ 1 ① C Join 4 1 2 3 4 5 6 7 8 9 10 11 12 2 B Primary Key A B C D 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 ① ② ③ ④ ⑤ ⑥ 交差する葉のMBR 1,①2,⑤3,⑤ 1,②3,④ 2,③ 4,⑥ • 主キーで多く分割が起こる • Restrictionが有効に働かない • Join属性の交差領域は減

  4. D ⑤ • 主キーの重要度低くしてRestrictionで絞込みを行う 3 B ③ 4 ⑥ ④ ① Join C 2 A 1 1 2 3 4 5 6 7 8 9 10 11 12 Primary Key A B C D 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 ① ② ③ ④ ⑤ ⑥ • Restrictionで用いられる属性で • 多く分割が起こる • Restrictionが有効 • Join属性の交差領域は増 • ⇒前回はこの状況で交差領域を減らす •   手法について提案を行った 1,① 1,② 1,③ 1,④ 1,⑤ 1,⑥ 2,① 2,② 2,③ 3,③ 3,④ 3,⑤ 4,④ 4,⑤ 4,⑥ これら二つの場合をRestrictionをふまえたJoinで比較

  5. 部分空間DFRJの基本的なアルゴリズム • DFRJ: Depth-First R-tree Join ①ルートノード同士でMBRが部分空間で交差しかつRestrictionの条件      を満たすエントリを求める ② ①でエントリが見つかると再帰的に部分木を辿ってMBRが交差する       エントリを求める SpatialJoin1(R, S: R_Node); (*height of R is equal height of S *) FOR (all ES∈S) DO FOR (all ER∈R with ER.rect(DR)∩ES.rect(DS)≠φand Restriction) DO IF (R is a leaf page) THEN (* (S is also a leaf page) *) output (ER, ES) ELSE ReadPage (ER.ref); ReadPage (ES.ref); SpatialJoin1(ER.ref, ES.ref) END END END END SpatialJoin1;

  6. 実装状況 • 木の構造、高さが同じ場合はJoin + Restrictionが可能 しかしTPC-Hにおいては Lineitemテーブルのデータ数を60000とした場合、Partテーブルのデータ数は2000となり作成される木の高さが異なる 今後について • 木の高さが違う場合について • 前回提案した交差領域を減らす手法の課題点・その他の手法についての考察

  7. 交差領域を減らす手法について • 前回の提案 • MBRの再構成 C 3 B ② D ⑤ 4 Join ③ 2 A ⑥ 1 ④ ① C 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 このMBRで探索することに より交差領域削減 AとCのMBRの交差領域に基づきMBRを再構成 ⇒交差領域におけるLowerとUpperの点でMBRを作成 1 1

  8. 課題点 • Lowerが交差領域の最小に近くまたUpperが交差領域の最大に近い場合 D ② D ⑤ 3 B 4 ③ Join ⑥ 2 A ④ 1 ① C 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 AとDの交差領域におけるLowerとUpperの点でMBRを作成 1 1 この領域の探索(Eg. ④)は無駄

  9. その他の手法について(TPC-Hを考慮した場合に有効である条件)その他の手法について(TPC-Hを考慮した場合に有効である条件) • TPC-Hのデータ分布(1) • Joinの条件となる属性(Join属性)はキー属性 • Joinを行う木においてどちらかの木ではJoin属性は主キー • 複合主キーでない場合、軸の各位置に存在する値は唯一 MBR1と2は横軸のみでみると交差 しかし交差範囲においてMBR1(2)中に 点が存在する位置にはMBR2(1)では点は 存在しない 3 2 4 1 Primary Key 各位置に重複は存在しない データが2000存在すればキー値も2000存在する

  10. TPC-Hのデータ分布(2) • 主キーとなるほうのテーブルに存在しないキー値はもう一方のテーブルにも存在しない(逆は成り立たない) A B 3 ② ⑤ 2 Join ③ 4 ⑥ 1 Primary Key (Join Attribute) ④ ① Join Attribute 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 Aに存在するキー値のみがBに存在 Aに存在するキー値がBに存在しない場合もある このようなこともふまえて交差領域を減らす手法について考察

More Related