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
  • 相关阅读:
    55. Jump Game
    367. Valid Perfect Square
    22. Generate Parentheses
    254. Factor Combinations
    77. Combinations
    17. Letter Combinations of a Phone Number
    javascript获取随机数的几种方式
    javascript获取随机rgb颜色和十六进制颜色的方法
    javascript遍历数组最优写法
    javascript中字符串的常用方法
  • 原文地址:https://www.cnblogs.com/daixingqing/p/3564804.html
Copyright © 2011-2022 走看看