zoukankan      html  css  js  c++  java
  • 数据库全文检索对比

    declare @t1 datetime,@total int
    set @t1=GETDATE()
    select rowId,BuildName from (select top 2896 row_number() over( order by id asc) rowId,BuildName from tbl_data_House 
     order by id asc) tb where tb.rowId>10 and tb.rowId<=20
    print datediff(ms,@t1,getdate())
    --33
    go
    
    declare @t1 datetime
    set @t1=GETDATE()
    exec SP_pagination 'select id,BuildName from tbl_data_House',2,10
    print datediff(ms,@t1,getdate())
    --1006
    go 
    declare @t1 datetime,@total int
    set @t1=GETDATE()
    select rowId,BuildName from (select top 2896 row_number() over( order by id asc) rowId,BuildName from tbl_data_House 
    where [Address] like '%安亭%' order by id asc) tb where tb.rowId>10 and tb.rowId<=20
    print datediff(ms,@t1,getdate())
    --1323
    go
    
    declare @t1 datetime
    set @t1=GETDATE()
    exec SP_pagination 'select id,BuildName from tbl_data_House where [Address] like ''%安亭%''',2,10
    print datediff(ms,@t1,getdate())
    --313
    go
    
    execute sp_fulltext_database 'enable'
    go
    
    declare @t1 datetime,@total int
    set @t1=GETDATE()
    select rowId,BuildName from (select top 2896 row_number() over( order by id asc) rowId,BuildName from tbl_data_House 
    where contains([Address],'安亭') order by id asc) tb where tb.rowId>10 and tb.rowId<=20
    print datediff(ms,@t1,getdate())
    --16
    go
    
    declare @t1 datetime
    set @t1=GETDATE()
    exec SP_pagination 'select id,BuildName from tbl_data_House where contains([Address],''安亭'')',2,10
    print datediff(ms,@t1,getdate())
    --13
    go
    --contains([Address],'安亭')
    declare @t1 datetime,@total int
    set @t1=GETDATE()
    select rowId,BuildName from (select top 2896 row_number() over( order by id asc) rowId,BuildName from tbl_data_House 
    
     order by id asc) tb where tb.rowId>10 and tb.rowId<=20
    print datediff(ms,@t1,getdate())
    --13
    go
    
    declare @t1 datetime
    set @t1=GETDATE()
    exec SP_pagination 'select id,BuildName from tbl_data_House',2,10
    print datediff(ms,@t1,getdate())
    --843
    go
  • 相关阅读:
    关于display:flex
    关于兼容性——百分比对于IE浏览器的影响
    谈谈一个菜鸟写了一段时间的静态页面
    2016.01.02
    课时21:函数:lambda表达式
    课时20:内嵌函数和闭包
    课时19:函数:我的地盘听我的
    课时18:函数:灵活即强大
    课时17:函数:Python的乐高积木
    课时16:序列
  • 原文地址:https://www.cnblogs.com/daixingqing/p/3564804.html
Copyright © 2011-2022 走看看