正在加载图片...
Selection Operation File scan Algorithm A1 (linear search).Scan each file block and test all records to see whether they satisfy the selection condition. Cost estimate=b,block transfers +1 seek b,denotes number of blocks containing records from relation r If selection is on a key attribute,can stop on finding record cost=(b,/2)block transfers +1 seek Linear search can be applied regardless of selection condition or ordering of records in the file,or availability of indices Note:binary search generally does not make sense since data is not stored consecutively except when there is an index available, and binary search requires more seeks than index search Database System Concepts-6th Edition 12.10 ©Silberschat乜,Korth and SudarshanDatabase System Concepts - 6 12.10 ©Silberschatz, Korth and Sudarshan th Edition Selection Operation File scan Algorithm A1 (linear search). Scan each file block and test all records to see whether they satisfy the selection condition. Cost estimate = br block transfers + 1 seek  br denotes number of blocks containing records from relation r If selection is on a key attribute, can stop on finding record  cost = (br /2) block transfers + 1 seek Linear search can be applied regardless of  selection condition or  ordering of records in the file, or  availability of indices Note: binary search generally does not make sense since data is not stored consecutively except when there is an index available, and binary search requires more seeks than index search
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有