Quantcast
Channel: SCN: Message List - SAP Adaptive Server Enterprise (SAP ASE) for Custom Applications
Viewing all articles
Browse latest Browse all 3587

Re: utcgetdate - stop a query after x time

$
0
0

Rob, you're right ... that's what I get for doing a drive-by shooting ...*arg*

 

---------------

 

Hmmmm, and rolling this into a where/SARG clause it looks like the query engine does halt processing of rows once the time limit has been hit.

 

====================

-- let run to completion

 

select convert(varchar,dbo.f_getdate(so.id),109)

from sysobjects so, syscolumns

go

     200K rows, cpu = 7500ms, logical IOs = 1,830

     table/index accesses = ~400K each

       

-- let run for 2 seconds

 

select convert(varchar,dbo.f_getdate(so.id),109)

from sysobjects so, syscolumns

where dbo.f_getdate(so.id) <= dateadd(ss,2,getdate())

go

 

     55K rows, cpu = 2000ms, logical IOs = 200

     table/index accesses = ~110K each

 

====================


Viewing all articles
Browse latest Browse all 3587

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>