正在加载图片...
Measures of Query Cost Disk cost can be estimated as: ·Number of seeks average-seek-cost Number of blocks read average-block-read-cost Number of blocks written average-block-write-cost For simplicity we just use the number of block transfers from disk and the number of seeks as the cost measures f-time to transfer one block Assuming for simplicity that write cost is same as read cost ·ts-time for one seek Cost for b block transfers plus S seeks b *t+S *ts 加 fs and f depend on where data is stored;with 4 KB blocks: High end magnetic disk:ts=4 msec and f=0.1 msec SSD:ts 20-90 microsec and t=2-10 microsec for 4KB Database System Concepts-7th Edition 15.8 ©Silberscha乜,Korth and SudarshanDatabase System Concepts - 7 15.8 ©Silberschatz, Korth and Sudarshan th Edition Measures of Query Cost ▪ Disk cost can be estimated as: • Number of seeks * average-seek-cost • Number of blocks read * average-block-read-cost • Number of blocks written * average-block-write-cost ▪ For simplicity we just use the number of block transfers from disk and the number of seeks as the cost measures • tT – time to transfer one block ▪ Assuming for simplicity that write cost is same as read cost • tS – time for one seek • Cost for b block transfers plus S seeks b * tT + S * tS ▪ tS and tT depend on where data is stored; with 4 KB blocks: • High end magnetic disk: tS = 4 msec and tT =0.1 msec • SSD: tS = 20-90 microsec and tT = 2-10 microsec for 4KB
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有