带索引的JOIN成本

时间:2014-01-13 16:47:32

标签: sql relational-database b-tree b-tree-index

鉴于以下内容:

blocksize = 4K
relation students(S#, Sname, Age,....)
relation taken(S#, C#, Grade)
Number of student records = 10,000
Number of taken records = 50,000
Size of student records = 200 bytes
Size of taken records = 50 bytes

如果在S#上有B-Tree索引,并且使用该索引完成了“学生加入”,那么执行JOIN需要多少钱?

假设每个B树节点包含最多4K个数据(= blocksize)。

0 个答案:

没有答案