这么的表和查询条件,索引有效吗,会扫描表吗

这样的表和查询条件,索引有效吗,会扫描表吗?TAB1col1col2其中col1上有索引1. select * from TAB1 where co

这样的表和查询条件,索引有效吗,会扫描表吗?
TAB1

col1      col2
其中col1上有索引

1. select * from TAB1 where col1=X and col2=Y
2. select col1 from TAB1 where col1=X and col2=Y

这两个查询语句,索引都会生效吗?
[解决办法]
为什么不在col1、col2上建立复合索引?
DB2 查看一条SQL的执行计划
db2 explain plan with snapshot for query
 db2exfmt

 or

 db2 set current explain mode yes
 db2 set current explain snapshot yes
 run the query
 db2exfmt
[解决办法]
这两个查询语句,索引都会生效