Chỉ mục B-Tree (05) (Phương thức truy cập dữ liệu trong hệ thống tính toán) (Tiếng Anh)
Slide bài giảng giới thiệu về các phương thức truy cập dữ liệu trong hệ thống tính toán cường độ dữ liệu, bao gồm quét toàn bộ bảng, tìm kiếm nhị phân và cấu trúc chỉ mục B-Tree.
正在生成预览...
Data-intensive Computing Systems Operators for Data Access Shivnath Babu 1 Problem ◼ Relation: Employee (ID, Name, Dept, …) ◼ 10 M tuples ◼ (Filter) Query: SELECT * FROM Employee WHERE Name = “Bob” Solution #1: Full Table Scan ◼ Storage: ◼ Employee relation stored in contiguous blocks ◼ Query plan: ◼ Scan the entire relation, output tuples with Name = “Bob” ◼ Cost: ◼ Size of each record = 100 bytes ◼ Size of relation = 10 M x 100 = 1 GB ◼ Time @ 20 MB/s ≈ 1 Minute 3 Solution #2 ◼ Storage: ◼ Employee relation sorted on Name attribute ◼ Query plan: ◼ Binary search 4 Solution #2 ◼ Cost: ◼ Size of a block: 1024 bytes ◼ Number of records per block: 1024 / 100 = 10 ◼ Total number of blocks: 10 M / 10 = 1 M ◼ Blocks accessed by binary search: 20 ◼ Total time: 20 ms x 20 = 400 ms 5 Solution #2: Issues ◼ Filters on different attributes: SELECT * FROM Employee WHERE Dept = “Sales” ◼ Inserts and Deletes 6 Indexes ◼ Data structures that efficiently evaluate a class of filter predicates over a relation ◼ Class of filter predicates: ◼ Single or multi-attributes (index-key attributes) ◼ Range and/or equality predicates ◼ (Usually) independent of physical storage of relation: ◼ Multiple indexes per relation 7 Indexes ◼ Disk resident ◼ Large to fit in memory ◼ Persistent ◼ Updated when indexed relation updated ◼ Relation updates costlier ◼ Query cheaper 8 Problem ◼ Relation: Employee (ID, Name, Dept, …) ◼ (Filter) Query: SELECT * FROM Employee WHERE Name = “Bob” Single-Attribute Index on Name that supports equality predicates Roadmap ◼ Motivation ◼ Single-Attribute Indexes: Overview ◼ Order-based Indexes ◼ B-Trees ◼ Hash-based Indexes (May cover in future) ◼ Extensible Hashing ◼ Linear Hashing ◼ Multi-Attribute Indexes (Chapter 14 GMUW, May cover in future) 10 Single Attribute Index: General Construction A B a1 b1 a2 b2 ai bi an bn Single Attribute Index: General Construction A B a1 a1 b1 a2 a2 b2 ai ai bi an an bn
… 下载原始文件以阅读完整文档。
- 文档名称
- Chỉ mục B-Tree (05) (Phương thức truy cập dữ liệu trong hệ thống tính toán) (Tiếng Anh)
- 学校 / 课程
- Duke University · Big Data
- 内容
- Tài liệu trình bày các kỹ thuật truy cập dữ liệu, so sánh quét toàn bộ bảng với sắp xếp dữ liệu, và giới thiệu chỉ mục như một giải pháp tối ưu. Trọng tâm là phân tích chi tiết về cây B (B-Trees) và cách chúng cải thiện hiệu suất truy vấn so với cây tìm kiếm nhị phân.
- 目录
- Problem
- Solution #1: Full Table Scan
- Solution #2
- Solution #2: Issues
- Indexes
- Problem
- Roadmap
- Single Attribute Index: General Construction
- Exceptions
- Single Attribute Index: General Construction
- Single Attribute Index: General Construction
- Roadmap
- B-Trees
- Use Binary Search Tree Directly?
- Use Binary Search Tree Directly?
- Use Binary Search Tree Directly?
- B-Tree vs. Binary Search Tree
- B-Tree Example
- B-Tree Example
- Meaning of Internal Node
- B-Tree Example
- Meaning of Leaf Nodes
- Equality Predicates
- Equality Predicates
- Equality Predicates
- 页数
- 50 页
- 上传者
- Giang Le
常见问题
此文档免费吗?
是的。“Chỉ mục B-Tree (05) (Phương thức truy cập dữ liệu trong hệ thống tính toán) (Tiếng Anh)”是免费的 — 只需登录并点击“下载”即可获取原始文件。
这份文档有多少页?
该文档共有 50 页,适用于课程 Big Data。您可以在下载前进行在线预览。
我可以在下载前预览吗?
是的。您可以通过在线阅读器直接在本页面预览此文档,然后再决定是否下载。

评论 (0)
暂无评论。快来抢沙发吧!