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