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
  • 相关阅读:
    Codeforces题目 java程序员
    5个能够有效帮助你快速创建超棒CSS3动画效果的类库 java程序员
    POJ3140:Contestants Division(DFS,树形DP) java程序员
    github的学习使用以及将自己开发的app传上去。
    考研还是就业
    五月道别
    写给一个陌生的朋友
    有办法忘了一个人吗?
    困惑啊,我倒底错在哪里?
    招聘广告文字撰写者时注意11项
  • 原文地址:https://www.cnblogs.com/daixingqing/p/3564804.html
Copyright © 2011-2022 走看看