Fundamentals of Database systems 3th edition PHẦN 7

Tất cả ba phân tách "mất" fd1 phụ thuộc chức năng. Phân hủy mong muốn trên là thứ ba, bởi vì nó sẽ không tạo ra bộ dữ liệu giả sau khi tham gia. Một thử nghiệm để xác định xem một phân hủy là nonadditive (lossless) sẽ được thảo luận trong mục dưới bất động sản LJ1. Nói chung, một mối quan hệ | buffers then all blocks from the other partition are read one at a time and each record is used to probe that is search partition for matching record s . Any matching records are joined and written into the result file. To improve the efficiency of in-memory probing it is common to use an in-memory hash table for storing the records in partition by using a different hash function from the partitioning hash function Note 14 . We can approximate the cost of this partition hash-join as for our example since each record is read once and written back to disk once during the partitioning phase. During the joining probing phase each record is read a second time to perform the join. The main difficulty of this algorithm is to ensure that the partitioning hash function is uniform that is the partition sizes are nearly equal in size. If the partitioning function is skewed nonuniform then some partitions may be too large to fit in the available memory space for the second joining phase. Notice that if the available in-memory buffer space 2 where is the number of blocks for the smaller of the two files being joined say R then there is no reason to do partitioning since in this case the join can be performed entirely in memory using some variation of the nested-loop join based on hashing and probing. For illustration assume we are performing the join operation OP6 repeated below OP6 EMPLOYEEdno dnumber department In this example the smaller file is the department file hence if the number of available memory buffers 2 the whole department file can be read into main memory and organized into a hash table on the join attribute. Each employee block is then read into a buffer and each employee record in the buffer is hashed on its join attribute and is used to probe the corresponding in-memory bucket in the department hash table. If a matching record is found the records are joined and the result record s are written to the result buffer and eventually to the result file on disk. .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
10    68    1    19-05-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.