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
  • 相关阅读:
    no module name cx_oracle 的解决方法
    开通博客
    普通用户启动Hadoop格式化namenode出现无法创建目录的问题
    改写文件权限时出现问题___2
    suse添加普通用户赋予root所有权限时出现问题___1
    suse系统vim未正常退出产生的问题(can't write viminfo file /home/zhaoy/.viminfo)
    intellij idea根据mvn仓库添加或改变scala-sdk
    git拉项目和上传项目时遇到的一些问题
    简单的clone项目fromGitHub
    初始机器学习
  • 原文地址:https://www.cnblogs.com/daixingqing/p/3564804.html
Copyright © 2011-2022 走看看