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 2005 Forums
 Transact-SQL (2005)
 Will BEGIN TRY slow things down?

Author  Topic 

sql777
Constraint Violating Yak Guru

314 Posts

Posted - 2007-07-05 : 09:40:25
If I use the follow structure in my sprocs, will it slow things down a bit?

BEGIN TRY
SELECT ....
END TRY
BEGIN CATCH
EXEC -- some sproc to log the exception
END CATCH

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-07-05 : 09:45:18
No such issue that I know of.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

pootle_flump

1064 Posts

Posted - 2007-07-05 : 10:20:55
Only if you have some sort of transaction management within your try... catch blocks but that is to do with the transactions rather than try.... catch itself.
Go to Top of Page

rudesyle
Posting Yak Master

110 Posts

Posted - 2007-07-05 : 10:26:24
quote:
Originally posted by sql777

If I use the follow structure in my sprocs, will it slow things down a bit?

BEGIN TRY
SELECT ....
END TRY
BEGIN CATCH
EXEC -- some sproc to log the exception
END CATCH



I don;t think so. But these types of issues are easily prototyped and tested, so go for it and let us know!
Go to Top of Page
   

- Advertisement -