非聚集索引,建好了,ASP怎么调用它? 还是不需要调用的? 建好了就自动生效?语句还是原来的一模一样?

解决方案 »

  1.   

    DBMS会于最优化来执行sql,是否用到索引最好由DBMS来管理。
      

  2.   

    有二个表,连接在一起的.一个分类表 ClassT  classID,分类名classname
    一个文章表 News    NewsID ,还有一个Classid,时间newtime,文章名newsname二个classid相同我在分类表上建个classid非聚集索引
    在文章表上,建classid,newtime 非聚集索引.   语句是按order by newtime desc
      

  3.   

    china165() 
    -----------------
    order by对于索引的利用不充分,索引对于性能提高最明显的地方在于where语句后面的部分
      

  4.   

    exists(select 1 from ClassT where ClassID=ClassT.ClassID)
    我在WHere里使用了这句where exists(select classid from ClassT where ClassID=ClassT.ClassID) order by newtime desc
      

  5.   

    我刚才试了一下,加order by 与不加order by 速度慢600毫秒。
      

  6.   

    exists(select 1 from ClassT where ClassID=ClassT.ClassID)
    怎么改成用Inner join ?