Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 query without cache

Author  Topic 

marconi8
Yak Posting Veteran

73 Posts

Posted - 2003-05-08 : 06:47:58
when my query starts for the first time, then i can see in sql profiler real duration time, but wjen this same query start for the next time , then duration time = 0, it is because second time fired same query uses cache

how to disable this cache, i must to disable it for see real time, that depends my query

thanks

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2003-05-08 : 06:52:14
I always ..

dbcc dropcleanbuffers
dbcc freeproccache
dbcc flushprocindb(db_id())
go
declare @t datetime
select @t = getdate()
exec dbo.myprocthatiamtesting
select datediff(ms,@t,getdate()) as 'execution time in ms'

 


Jay White
{0}
Go to Top of Page

marconi8
Yak Posting Veteran

73 Posts

Posted - 2003-05-08 : 07:04:01
thanks, it was that i was looking for, only one litle problem, i cannot find in help , what is it flushprocindb , and how correctly i must to write that string,

Go to Top of Page

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2003-05-08 : 07:33:06
http://www.transactsql.com/statement/DBCCFLUSHPROCINDB.html

Jay White
{0}
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2003-05-08 : 09:43:52
Jay,

Why do you do that, and when did you blow by 2k?

Congrats!



Brett

8-)
Go to Top of Page
   

- Advertisement -