首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

关于数据库索引的有关问题~求教

2012-02-28 
关于数据库索引的问题~求教~数据库索引的优缺点是什么?什么是合理索引。以下语句涉及内容均建立了索引,请问

关于数据库索引的问题~求教~
数据库索引的优缺点是什么?什么是合理索引。以下语句涉及内容均建立了索引,请问其操作是否效率高?如果不是,请写出效率高的方式?
a select content from record where substring(card_no,1,4)='5378'
b select content from record where amount/30=1000
c select content from record where convert(char(10),data,112)='19990513'

对索引实在不解,看了相关资料还是不知道怎么去分辨效率高低问题,请懂的朋友告知~~

[解决办法]

a select content from record where substring(card_no,1,4)='5378'
select content from record where card_no like '5378%'

b select content from record where amount/30=1000
select content from record where amount=1000*30

c select content from record where convert(char(10),data,112)='19990513'
select content from record where data>='19990513' and data<'19990514'



[解决办法]

探讨
a select content from record where substring(card_no,1,4)='5378'
select content from record where card_no like '5378%'

b select content from record where amount/30=1000
select content from record……

热点排行