May 14, 2012 at 2:38 pm
will there be any performance impact if SP is called from Same DB or Called from Other DB.
For example:
DB1 has SP1 (Select 'Hello World')
DB2 has SP1 (Select 'Hello World')
Will there be any performace impact:
if I call do in DB1 as below:
EXEC dbo.SP1
EXEC DB2.dbo.SP1
thanks in advance. I am using hello world as example. the SP could have more statements..
May 14, 2012 at 2:45 pm
No.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
May 15, 2012 at 7:29 am
Yes, depending on what the procs are doing. If they are joining data across servers, then all bets are off. Even if they are processing data on each server locally, the return for the remote call WILL take longer, depending on distance to other server, number of switches, size of return resultset etc.
The answer involves asking a lot more questions to determine what it is exactly you want to do.
May 15, 2012 at 7:39 am
the server is same Local. My question is a kind of theory question.
when SP is called from same DB or the same DB calles the SP that is in another DB, will it be a any impact on performance.
for example: Let us say:
what if XP_cmdShell is in local DB1 instead of Master DB. Performance wise, will there be any differance?
thanks
May 15, 2012 at 8:34 am
No, there will be no effect from having procedures in DB1 vs DB2 on the same server.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
May 15, 2012 at 12:55 pm
GilaMonster (5/15/2012)
No, there will be no effect from having procedures in DB1 vs DB2 on the same server.
Yup, on same server, no issue.
May 15, 2012 at 7:33 pm
DiverKas (5/15/2012)
Yes, depending on what the procs are doing. If they are joining data across servers, then all bets are off. Even if they are processing data on each server locally, the return for the remote call WILL take longer, depending on distance to other server, number of switches, size of return resultset etc.The answer involves asking a lot more questions to determine what it is exactly you want to do.
While the op didn't actually say, I believe the question was only for across DB's on the same server in which case the answer would be "no".
--Jeff Moden
Change is inevitable... Change for the better is not.
May 15, 2012 at 7:35 pm
Jeff Moden (5/15/2012)
DiverKas (5/15/2012)
Yes, depending on what the procs are doing. If they are joining data across servers, then all bets are off. Even if they are processing data on each server locally, the return for the remote call WILL take longer, depending on distance to other server, number of switches, size of return resultset etc.The answer involves asking a lot more questions to determine what it is exactly you want to do.
While the op didn't actually say, I believe the question was only for across DB's on the same server in which case the answer would be "no".
Dammit.. did it again. :blush: Gotta remember to "scroll down".
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply