跳过DB2中的扫描 [英] Skip scans in DB2

查看:73
本文介绍了跳过DB2中的扫描的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图谷歌跳过扫描DB2什么都没有。

DB2是否具有不同名称的功能?

解决方案

" AK" < AK ************ @ yahoo.com>在消息中写道

news:46 ************************** @ posting.google.c om ...

我试图谷歌跳过扫描DB2什么都没有。
DB2是否有不同名称的功能?




你能解释一下这个功能是什么吗?


AK写道:

我试图谷歌跳过扫描DB2但是什么都没有。
DB2是否具有不同名称的功能?




在Oracle中,这意味着即使可以使用索引也是如此访问不是

由第一列索引


即表a,b,c,d,a,b,c上的索引将使用

表示索引的where子句只提到b。节省必须在a,b,c
和b,c和c(可能还有b和a,c)上构建索引。


AK写道:

我试图谷歌跳过扫描DB2但没有想到什么。 DB2是否具有不同名称的功能?



在Oracle中,这意味着即使第一个访问不是
,也可以使用索引列索引
如表a,b,c,d,a,b,c上的索引将使用所述索引时
where子句仅提及b。节省必须在a,b,c
和b,c和c(也可能是b和a,c)上建立索引。




目前为止据我所知,DB2 UDB for LUW不能这样做。


但是,如果要在(a),(b)和(c)上创建3个单独的索引,那么DB2

当然可以应用索引ANDing,如果你有b = b(a)或(b)或(c)或((a)和(c))或( (b)和(c))。


真正的问题是你的应用程序是否有适当的索引设计

。在(a),

(b),(c),(a,c)和(b,c)上创建索引可能不是一个好主意!



----- =通过Newsfeeds.Com发布,未经审查的Usenet新闻= -----
http://www.newsfeeds.com - 世界排名第一的新闻组服务!

----- = =超过100,000个新闻组 - 19个不同的服务器! = -----


I tried to google "skip scan DB2" but came up with nothing.
Does DB2 have the feature under a different name?

解决方案

"AK" <ak************@yahoo.com> wrote in message
news:46**************************@posting.google.c om...

I tried to google "skip scan DB2" but came up with nothing.
Does DB2 have the feature under a different name?



Can you explain what the feature is?


AK wrote:

I tried to google "skip scan DB2" but came up with nothing.
Does DB2 have the feature under a different name?



In Oracle, it means that an index can be used even if the access is not
by the first column indexed

I.e Table with a,b,c,d, with an index on a,b,c will use said index when
the where clause only mentions b. Saves having to build indexes on a,b,c
and b,c and c (and potentially also b and a,c).


Mark Townsend wrote:

AK wrote:

I tried to google "skip scan DB2" but came up with nothing. Does DB2
have the feature under a different name?


In Oracle, it means that an index can be used even if the access is not
by the first column indexed

I.e Table with a,b,c,d, with an index on a,b,c will use said index when
the where clause only mentions b. Saves having to build indexes on a,b,c
and b,c and c (and potentially also b and a,c).



As far as I know, DB2 UDB for LUW can not do this.

However, if you were to create 3 separate indexes on (a), (b) and (c), DB2
can certainly apply index ANDing in cases where you have predicates on
(a) or (b) or (c) or ((a) and (c)) or ((b) and (c)).

The real question is whether you have an appropriate index design for
your application. It''s probably not a good idea to create indexes on (a),
(b), (c), (a,c), and (b,c)!


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----


这篇关于跳过DB2中的扫描的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆