正在加载图片...
Selections Using Indices Index scan -search algorithms that use an index selection condition must be on search-key of index A3(primary index on candidate key,equality).Retrieve a single record that satisfies the corresponding equality condition Cost=(hi+1)*(tT+ts) A4(primary index on nonkey,equality)Retrieve multiple records. Records will be on consecutive blocks Let b number of blocks containing matching records Cost=hi *(tr+ts)+ts+tr*b A5(equality on search-key of secondary index). Retrieve a single record if the search-key is a candidate key Cost =(hi+1)*(tr+ts) Retrieve multiple records if search-key is not a candidate key each of n matching records may be on a different block Cost=(h;+n)*(t+ts) Can be very expensive! Database System Concepts-5th Edition,Aug 27,2005. 13.11 @Silberschatz,Korth and SudarshanDatabase System Concepts - 5 13.11 ©Silberschatz, Korth and Sudarshan th Edition, Aug 27, 2005. Selections Using Indices Index scan – search algorithms that use an index selection condition must be on search-key of index. A3 (primary index on candidate key, equality). Retrieve a single record that satisfies the corresponding equality condition Cost = (hi + 1) * (tT + tS) A4 (primary index on nonkey, equality) Retrieve multiple records. Records will be on consecutive blocks  Let b = number of blocks containing matching records Cost = hi * (tT + tS) + tS + tT * b A5 (equality on search-key of secondary index). Retrieve a single record if the search-key is a candidate key  Cost = (hi + 1) * (tT + tS) Retrieve multiple records if search-key is not a candidate key  each of n matching records may be on a different block  Cost = (hi + n) * (tT + tS) – Can be very expensive!
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有