文档介绍:
信息科学与技术学院计算机系数据库系统概论AnIntroductiontoDatabaseSystem第九章关系查询处理和查询优化AnIntroductiontoDatabaseSystem第九章关系系统及其查询优化9.1关系数据库系统的查询处理9.2关系数据库系统的查询优化9.3代数优化9.4物理优化9.3小结AnIntroductiontoDatabaseSystem9.1关系数据库系统的查询处理9.1.1查询处理步骤9.1.2实现查询操作的算法示例AnIntroductiontoDatabaseSystem9.1.1查询处理步骤查询分析词法/语法/语义分析符号名转换查询检查语义检查安全性检查完整性检查查询优化代数优化物理优化查询执行查询计划生成代码生成AnIntroductiontoDatabaseSystem9.1.2实现查询操作的算法示例一选择操作的实现二连接操作的实现AnIntroductiontoDatabaseSystem9.1.2实现查询操作的算法示例一选择操作的实现1、简单的全表扫描方法2、索引(或散列)扫描方法[例1]Select*fromstudent where表达式情况:C1:无条件;C2:Sno=‘200215121’;C3:Sage>20;C4:Sdept=‘CS’ANDSage>20;AnIntroductiontoDatabaseSystem9.1.2实现查询操作的算法示例1、简单的全表扫描方法AnIntroductiontoDatabaseSystem9.1.2实现查询操作的算法示例2、索引(或散列)扫描方法[例1-C2]Sno上有索引[例1-C3]Sage上有B+树索引[例1-C4]Sdept和Sage上都有索引AnIntroductiontoDatabaseSystem9.1.2实现查询操作的算法示例二连接操作的实现1、嵌套循环方法(nestedloop)2、排序-合并方法(sort-mergejoin)3、索引连接(IndexJoin)方法4、HashJoin方法[例2]Select*fromstudent,sc wherestudent.sno=sc.sno;AnIntroductiontoDatabaseSystem
内容来自淘豆网www.taodocs.com转载请标明出处.