1. Trang chủ >
  2. Công Nghệ Thông Tin >
  3. Cơ sở dữ liệu >

4…Choosing a Suitable Partitioning Strategy

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (12.94 MB, 298 trang )


9.5 Self Test Questions



67



3. Partitioning Strategy for Load Balancing

Which partitioning type is suited best to achieve fair load-balancing if the

values of the column are non-uniformly distributed?

(a) Partitioning based on the number of attributes used modulo the number of

systems

(b) Range Partitioning

(c) Round Robin Partitioning

(d) All partitioning types will show the same performance.



Reference

[Kar72] R. Karp, Reducibility among combinatorial problems, in Complexity of Computer

Computations, eds. by R. Miller, J. Thatcher (Plenum Press, 1972), pp. 85–103



Part III



In-Memory Database Operators



Chapter 10



Delete



The delete operation terminates the validity of a given tuple. It stores the information in the database that a certain item is no longer valid This operation can

either be of physical or logical nature. A physical delete operation removes an item

from the database so that it is no longer physically accessible. In contrast, a logical

delete operation only terminates the validity of an item in the dataset, but keeps the

tuple still available for temporal queries [Pla09].

The simplified SQL-Syntax for a delete statement looks like the following,

where the predicate may select a single or multiple tuples.



Listing 10.1: Delete syntax



10.1 Example of Physical Delete

In the following example, all persons with the name ‘Jane Doe’ are supposed to be

removed from a database table storing first and last names. Based on the applied

dictionary encoding (see Chap. 6), the table consists of two dictionaries and two

value attribute vectors.



First, the valueIDs for the first and last name need to be identified. Jane corresponds to valueID 23 and Doe to valueID 18, according to their respective dictionary.



H. Plattner, A Course in In-Memory Data Management,

DOI: 10.1007/978-3-642-36524-9_10, Ó Springer-Verlag Berlin Heidelberg 2013



71



72



10



Delete



Next, we scan through the attribute vectors and find the appropriate positions,

which means we look up the recordIDs for these values. In our example, there is

only one tuple with that combination of first and last name.



When finally deleting the two values from the attribute vectors, all subsequent

tuples need to be adjusted to maintain a sequence without gaps and they are moved to

preserve a sequential memory area. This implementation alternative of the delete

operation is therefore very expensive in terms of performance. In Chap. 26, later

during the course, the insert-only approach is presented as a better alternative to

implement deletion in typical enterprise use cases. This approach is of logical nature.



Xem Thêm
Tải bản đầy đủ (.pdf) (298 trang)

×