Re: Stored Procedures
- From: "Cor Ligthert[MVP]" <notmyfirstname@xxxxxxxxx>
- Date: Wed, 27 Feb 2008 06:39:43 +0100
Michel-
I have the idea that you are now at a company which has a lot of (in past called) batch processing which is probably still a main purpose for large computers on banks and I think you are now at a likewise company.
In your former job there was probably much more real time processing with many short processes at the database server.
I think that this is also a reason how you should do your executions on your database server.
I hope that I did understand you well.
-Cor
"Michel Posseth [MCP]" <MSDN@xxxxxxxxxxx> schreef in bericht news:ePLfywLeIHA.536@xxxxxxxxxxxxxxxxxxxxxxx
Cor ,
First of all Cor maybe my initiall comment was understood different by you as i intended it to be
"A stored procedure is not saved in its compiled version outside the cache, the same as any other Transact-SQL statement"
It is the execution plan that is eventually "compiled" and yes i know this is also happening for inline T-SQL , however with a SP this can in the case of a SQL batch and with optimizations much more efficient beside the advantage of encapsulation security etc etc ... for wich alone i would favor a SP
However my response to you was triggered by my personal question regarding this comment of you
Be aware however, that stored procedures are *not* compiled with exception from a DB2 database.
I know you are right seen from the common perspective ( don`t know about that DB2 thingy )
However when is something called then "Compiled" as our .Net / Java assembly`s are JITTED we just create the SQL counterpart of an execution plan
in my opinion,,,, i was just wondering how you thought about that
Also my remark about the Inside SQL server books was not intended in a offensive way , i am really a fan of the series especially of Kalen Dalenay as she writes in such a great style and gives somuch insight in how SQL server works behind the scenes .
Regards
Michel Posseth
"Cor Ligthert[MVP]" <notmyfirstname@xxxxxxxxx> schreef in bericht news:0EA7477B-E269-4DDC-81AB-D14547C57BB5@xxxxxxxxxxxxxxxxMichel-
I saw this on this page
"A stored procedure is compiled at execution time, like any other Transact-SQL statement"
Maybe would I have better written it in another way.
"A stored procedure is not saved in its compiled version outside the cache, the same as any other Transact-SQL statement"
As it is in your book in another way, you can give it in my idea to your boss to use as fuel.
-Cor
"Michel Posseth [MCP]" <MSDN@xxxxxxxxxxx> schreef in bericht news:eDOizFKeIHA.5296@xxxxxxxxxxxxxxxxxxxxxxxWill you show me where it is written this?definition of a SP "A stored procedure is a group of Transact-SQL statements compiled into a single execution plan."
I will show you were it is written
http://msdn2.microsoft.com/en-us/library/aa174792.aspx
I would say Cor buy yourself the Books inside SQL server
"Cor Ligthert[MVP]" <notmyfirstname@xxxxxxxxx> schreef in bericht news:70E60779-130F-432E-9595-3C75B982E60A@xxxxxxxxxxxxxxxxMichel-
AFAIK is there no difference in SQL by a stored sproc and a dynamic sproc.
Although a stored sproc is always the same and seems to work something smoother in the SQL serve3r cache that is used.
(There is also a slight difference in processing time, as I have seen even on a Jet database).
Will you show me where it is written this?definition of a SP "A stored procedure is a group of Transact-SQL statements compiled into a single execution plan."
-Cor
"Michel Posseth [MCP]" <MSDN@xxxxxxxxxxx> schreef in bericht news:%23jMQvs9dIHA.5348@xxxxxxxxxxxxxxxxxxxxxxxBe aware however, that stored procedures are *not* compiled with exception from a DB2 database.
Well ,,, this depends on your definition i guess
And yes i have read the inside SQL server 2000 and 2005 , :-)
definition of a SP "A stored procedure is a group of Transact-SQL statements compiled into a single execution plan."
Or how would you define a extended stored procedure written in C++ ( 2000 ) or .Net ( 2005 ) ( my experiences by the way regarding the lather is that they are much slower as there "uncompiled" transact SQL scounterparts )
The point i try to make is ,, how would someone define "compiled" especially when dealing with .Net and Java assemblys can we call those compiled ?
Just my thoughts
Michel
"Cor Ligthert[MVP]" <notmyfirstname@xxxxxxxxx> schreef in bericht news:52894810-6AE0-415B-AABE-CDEB79BB0792@xxxxxxxxxxxxxxxxsi_owen,
You have to add the Sqlparameters to the command.
Something as
creditSqlCommand.parameters.add(New Sqlparameter("@tokenString",1)
creditSqlCommand.parameters.add(New Sqlparameter("@currentDateString","Hello")
Be aware however, that stored procedures are *not* compiled with exception from a DB2 database.
Cor
.
- References:
- Stored Procedures
- From: si_owen
- Re: Stored Procedures
- From: Andrew Morton
- Re: Stored Procedures
- From: si_owen
- Re: Stored Procedures
- From: Cor Ligthert[MVP]
- Re: Stored Procedures
- From: Michel Posseth [MCP]
- Re: Stored Procedures
- From: Cor Ligthert[MVP]
- Re: Stored Procedures
- From: Michel Posseth [MCP]
- Re: Stored Procedures
- From: Cor Ligthert[MVP]
- Re: Stored Procedures
- From: Michel Posseth [MCP]
- Stored Procedures
- Prev by Date: Trap window activation and get title
- Next by Date: Re: How to override a textbox event?
- Previous by thread: Re: Stored Procedures
- Next by thread: Re: Stored Procedures
- Index(es):
Relevant Pages
|