Typical Access Paths

 

Typical Access Paths

Db2 determine an access path for every executable SQL statement. To do this, it looks at several things, such as the catalog statistics and configuration parameters. It takes into consideration how large a table is, whether there is an index on the table, and so forth.

You are capable of predicting and influencing the access path by the way you write your SQL statement.

1.       Relation scan

扫描整个表(where语句中的column没建索引)

2.       Matching index scan

从根索引开始找,到叶子索引,最后到相应的data pages中取数据(where语句中的column已建索引,但select语句中存在没建索引的column

3.       Index-only access

从索引中就能找到所有数据,不在access the data pageswhere语句中的column已建索引,并且select语句中的column都完全覆盖在此索引中)

4.       Non-matching index scan

从叶子索引开始扫描,然后在相应的data pages中取数据(where语句中的column已建索引,但不是leading part of the index key, 并且select语句中存在没建索引的column

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值