file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4...
Transcript of file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4...
![Page 1: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/1.jpg)
������������� ����������
����������� ��������
A. Gärtner1 A. Kemper1 D. Kossmann2 B. Zeller1
1 Universität Passau
94030 Passau, Germany
<lastname>@db.fmi.uni-passau.de
2 Technische Universität München
81667 München, Germany
![Page 2: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/2.jpg)
2
������
• Motivation
• Related work
• Idea: traditional horizonzal vs. new vertical approach
• Implementation
• Concurrency control and reorganisation
• Benchmark results
• Conclusion and future work
![Page 3: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/3.jpg)
3
����������
• bulk deletes used in:• SAP R/3 � Archiving • data warehouses � window technique
• today: 500 MB, 3 indices, 15% deleted � 2 h 50 min
• partitioning � drop partition, but :
• orthogonal deletes:
• data is partitioned according to orderdate
• data is deleted according to the orderstatus flag
• semantic restrictions
• „delete all orders with orderdate < 1995 but only if the order is fully processed“
![Page 4: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/4.jpg)
4
�������������
• B+-Trees used for indexing
• Leaf pages linked together
• Entries in leaves are sorted according to indexed values
• Record identified by unique Row Identifier (RID)
• RID contains physical address
FileNr BlockNr SlotNr
RID: 001 005 017
root
inner nodes
leaves
![Page 5: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/5.jpg)
5
������������
• deletion in B+-Trees- J.Jannink. Implementing deletion in B+-Trees.
ACM SIGMOD 1994- T.Johnson and D.Sasha. Utilization of B-Trees with
inserts, deletes and modifies. ACM SIGMOD 1989.
• bulk loading- J.v.d.Bercken, B.Seeger, and P.Widmayer. A generic
approach to bulk loading multidimensional index structures. VLDB 1997
- J.Wiener and J.Naughton. OODB bulk loading revisited: The partitioned list approach. VLDB 1995.
![Page 6: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/6.jpg)
6
������������
• Concurrent transactions- C.Zou and B.Salzberg. On-line reorganisation of sparsely-
populated B+- Trees. ACM SIGMOD 1996.- C.Mohan and F.Levine. ARIES/IM: An efficient and high
concurrency index management method using write-ahead logging. ACM SIGMOD 1992
• Pointer join processing- E.Shekita and M.Cary. A performance evaluation of pointer
based joins. ACM SIGMOD 1990.- R.Braumandl, J.Claussen, A.Kemper, and D.Kossmann.
Functional join processing. VLDB 1998.
![Page 7: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/7.jpg)
7
������������������������ ����!
"������#��#�#��$��� ����!%
������������ �������
Table R
![Page 8: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/8.jpg)
7
������������������������ ����!
"������#��#�#��$��� ����!%
������������ �������
Table R
disk pages
![Page 9: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/9.jpg)
7
������������������������ ����!
"������#��#�#��$��� ����!%
������������ �������
Table R
disk pages
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
![Page 10: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/10.jpg)
7
������������������������ ����!
"������#��#�#��$��� ����!%
������������ �������
Table R
disk pages
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
![Page 11: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/11.jpg)
7
������������������������ ����!
"������#��#�#��$��� ����!%
������������ �������
Table R
disk pages
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
![Page 12: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/12.jpg)
7
������������������������ ����!
"������#��#�#��$��� ����!%
������������ �������
Table R
disk pages
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
![Page 13: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/13.jpg)
7
������������������������ ����!
"������#��#�#��$��� ����!%
������������ �������
Table R
disk pages
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
� ���� ���
![Page 14: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/14.jpg)
7
������������������������ ����!
"������#��#�#��$��� ����!%
������������ �������
Table R
disk pages
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
� ���� ���
![Page 15: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/15.jpg)
7
������������������������ ����!
"������#��#�#��$��� ����!%
������������ �������
Table R
disk pages
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
� ���� ���
![Page 16: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/16.jpg)
7
������������������������ ����!
"������#��#�#��$��� ����!%
������������ �������
Table R
disk pages
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
� ���� ���
![Page 17: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/17.jpg)
7
������������������������ ����!
"������#��#�#��$��� ����!%
������������ �������
Table R
disk pages
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
� ���� ���
![Page 18: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/18.jpg)
7
������������������������ ����!
"������#��#�#��$��� ����!%
������������ �������
Table R
disk pages
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
� ���� ���
![Page 19: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/19.jpg)
7
������������������������ ����!
"������#��#�#��$��� ����!%
������������ �������
Table R
disk pages
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
� ���� ���
![Page 20: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/20.jpg)
7
������������������������ ����!
"������#��#�#��$��� ����!%
������������ �������
Table R
disk pages
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
� ���� ���
![Page 21: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/21.jpg)
7
������������������������ ����!
"������#��#�#��$��� ����!%
������������ �������
Table R
disk pages
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
� ���� ���
=> Random I/O on index leaf pages and table pages
![Page 22: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/22.jpg)
8
&�'����#���������(�������
� ����!
������������
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
�������
disk pages
![Page 23: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/23.jpg)
8
&�'����#���������(�������
� ����!
������������
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
�������
disk pages
sortA�������
![Page 24: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/24.jpg)
8
&�'����#���������(�������
� ����!
������������
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
�������
disk pages
sortA�������
![Page 25: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/25.jpg)
8
&�'����#���������(�������
� ����!
������������
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
�������
disk pages
sortA�������
![Page 26: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/26.jpg)
8
&�'����#���������(�������
� ����!
������������
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
�������
disk pages
sortA�������
![Page 27: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/27.jpg)
8
&�'����#���������(�������
� ����!
������������
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
�������
disk pages
sortA�������
![Page 28: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/28.jpg)
8
&�'����#���������(�������
� ����!
������������
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
�������
disk pages
sortA�������
![Page 29: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/29.jpg)
8
&�'����#���������(�������
� ����!
������������
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
�������
disk pages
sortA�������
![Page 30: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/30.jpg)
8
&�'����#���������(�������
� ����!
������������
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
�������
disk pages
sortA�������
![Page 31: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/31.jpg)
8
&�'����#���������(�������
� ����!
������������
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
�������
disk pages
sortA�������
sortRID
![Page 32: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/32.jpg)
8
&�'����#���������(�������
� ����!
������������
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
�������
disk pages
sortA�������
sortRID ���� ���
![Page 33: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/33.jpg)
8
&�'����#���������(�������
� ����!
������������
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
�������
disk pages
sortA�������
sortRID ���� ���
![Page 34: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/34.jpg)
8
&�'����#���������(�������
� ����!
������������
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
�������
disk pages
sortA�������
sortRID ���� ��� sortB
![Page 35: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/35.jpg)
8
&�'����#���������(�������
� ����!
������������
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
�������
disk pages
sortA�������
sortRID ���� ��� sortB
![Page 36: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/36.jpg)
8
&�'����#���������(�������
� ����!
������������
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
�������
disk pages
sortA�������
sortRID ���� ��� sortB
=> Sequential I/O on index leaf pages and table pages
![Page 37: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/37.jpg)
9
�$ ��$�����)��!����' � ����!
������������
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
sortA�������
���� ���sortRID sortB
![Page 38: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/38.jpg)
10
�$ ��$�����)��!����' � ����!
������������
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
sortA�������
���� ���sortRID sortB
![Page 39: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/39.jpg)
11
�$ ��$�����)��!����' � ����!
������������
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
sortA�������
���� ���sortRID sortB
![Page 40: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/40.jpg)
12
�����������������������!��*��
• Join operator � bulk delete operator:
Delete Set D Index I / Relation R
Delete Set D ‘ Index I‘ / Relation R‘
• generating bulk delete evaluation plans using exisiting
optimizers • method • order
predicate• primary
• different join techniques, but one argument in place
![Page 41: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/41.jpg)
13
���$ ��
Tabelle R
Index A Index B
Index C
RID A B C ...
• Delete from R where R.A in D(A)
• Schema:
![Page 42: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/42.jpg)
14
&�'����#���������(�������
� ����!
������������
Delete from R where R.A in (4711, 5614, 3817, 2918, 5917)
sortA�������
���� ���sortRID sortB
![Page 43: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/43.jpg)
15
+��,�����������-����.
�������� ������/�,� ����$ �
D(A)
sortA
sortRID
sortB
mergeA
mergeRID
mergeB,RID
IA(A,RID)
IB(B,RID)
R(RID,A,B,C,...)
[B,RID]
[RID]
![Page 44: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/44.jpg)
16
+��,�����������-����.
�������� ������/�,� 0�1����$ �
D(A)
sortA
sortRID
sortB
mergeB,RID
sortC
mergeC,RID
mergeRID
IA(A,RID)
IB(B,RID)IC(C,RID)
R(RID,A,B,C,...)mergeA
[B,RID][C,RID]
![Page 45: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/45.jpg)
17
+��,�����������-����.
�� #2��� ���)����)�� ����������)
D(A)
sortA
sortRID
mergeA
IA(A,RID)
R(RID,A,B,C,...)
buildprobe
hashRID
mergeRID
buildprobe
hashRID
build
probe
hashRID
Range partitioning on B using DB statistics
IB(B,RID)
[B,RID]
[RID]
![Page 46: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/46.jpg)
18
+��,�����������-����.
�� #2��� �� �������
D(A)
sortA
sortRID
mergeA
IA(A,RID)
IB(B,RID)
R(RID,A,B,C,...)
buildprobe
hashRID
Build Relationhas to fit
in memory
Join and update in one pass
mergeRID
[RID][RID]
![Page 47: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/47.jpg)
19
1��������,�1������
![Page 48: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/48.jpg)
19
1��������,�1������
• Take table R and all indices off-line (avoid lock escalation)
![Page 49: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/49.jpg)
19
1��������,�1������
• Take table R and all indices off-line (avoid lock escalation)
• Process R and all indices with unique constraints
![Page 50: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/50.jpg)
19
1��������,�1������
• Take table R and all indices off-line (avoid lock escalation)
• Process R and all indices with unique constraints
• Bring R and indices with unique constraints on-line
![Page 51: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/51.jpg)
19
1��������,�1������
• Take table R and all indices off-line (avoid lock escalation)
• Process R and all indices with unique constraints
• Bring R and indices with unique constraints on-line
• Remaining indices can be processed concurrently using sidefiles/direct propagation (C.Mohan and I.Narang. Algorithms for creating indexes for very large tables without quiescing updates. ACM SIGMOD 1992.)
![Page 52: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/52.jpg)
19
1��������,�1������
• Take table R and all indices off-line (avoid lock escalation)
• Process R and all indices with unique constraints
• Bring R and indices with unique constraints on-line
• Remaining indices can be processed concurrently using sidefiles/direct propagation (C.Mohan and I.Narang. Algorithms for creating indexes for very large tables without quiescing updates. ACM SIGMOD 1992.)
• Checkpoints: save high water mark
![Page 53: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/53.jpg)
19
1��������,�1������
• Take table R and all indices off-line (avoid lock escalation)
• Process R and all indices with unique constraints
• Bring R and indices with unique constraints on-line
• Remaining indices can be processed concurrently using sidefiles/direct propagation (C.Mohan and I.Narang. Algorithms for creating indexes for very large tables without quiescing updates. ACM SIGMOD 1992.)
• Checkpoints: save high water mark
• Recovery: roll forward to save work already done
![Page 54: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/54.jpg)
20
����)���������
• C.Zou and B.Salzberg. On-line reorganisation of sparsely-populated B+- Trees. ACM SIGMOD 1996.
• light version:
row movement• Problem: holes
![Page 55: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/55.jpg)
21
���!$�����������$���
• Prototype database
• B+-Trees based on Jan Janninks implementation
• Table R: 1.000.000 records (500 MB)
• Delete set D
• One index IA on attribute A
• Statement:
delete from R where R.A in (select D.A from D)
• sort merge evaluation plan used
![Page 56: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/56.jpg)
22
������
• Vary number of deleted records
• Vary number of indices
• Vary height of indices
• Vary size of memory
• Clustered table
Diagrams:
• not sorted/trad:
• sorted/trad
• not sorted/bulk
Delete set not sorted, traditional approach
Delete set sorted, traditional approach
Delete set not sorted, vertical approach
![Page 57: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/57.jpg)
23
(��,�&$��� ��� ��������������
0
20
40
60
80
100
120
140
5 10 15 20
Deleted tuples (% of tuples)
Tim
e (m
in)
not sorted trad.sorted trad.not sorted bulk
![Page 58: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/58.jpg)
24
(��,�&$��� �� �������
0
50
100
150
200
250
1 2 3
Number of indices (15% deleted)
Tim
e (m
in) not sorted/trad.
sorted/trad.not sorted/bulkdrop/create
![Page 59: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/59.jpg)
25
(��,����)!���� �������
�� ����� �����������
� �������������
������� �����������
������� ���
!"��#
������� ���
!"��#
15% deleted
![Page 60: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/60.jpg)
26
(��,�����������$��,
0
20
40
60
80
100
120
140
2 6 10
Memory (MB), 15% deleted
Tim
e (m
in)
sorted/trad.not sorted/trad.not sorted/bulk
![Page 61: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/61.jpg)
27
1������� �����
0
20
40
60
80
100
120
140
160
5 10 15 20
Percentage of deleted tuples
Tim
e (m
in) sorted/trad/clust
sorted/trad/unclustbulk/clustnot sorted/trad/clust
![Page 62: file• „delete all orders with orderdate < 1995 but only if the order is fully processed“ 4 ˘ˇˆ ˆ • B+-Trees used for indexing • Leaf pages linked together • Entries](https://reader031.fdocuments.us/reader031/viewer/2022041306/5e14a3c395c4da09313b3227/html5/thumbnails/62.jpg)
28
1���������
• New set-oriented vertical approach
• Implementation using evaluation plans
• bulk delete operator
• retrieve index keys from R
• RID join using hashing
• Concurrency control and reorganisation
• Benchmark results� new approach outperforms trad. approach
• Future Work: generalize the approach to hash tables, R- trees, grid files, bitmap indices