Click here to Skip to main content
15,887,746 members
Home / Discussions / Database
   

Database

 
GeneralRe: Do we need to promote SP's anymore? Pin
Mycroft Holmes25-Sep-11 2:12
professionalMycroft Holmes25-Sep-11 2:12 
GeneralRe: Do we need to promote SP's anymore? Pin
Mehdi Gholam25-Sep-11 9:10
Mehdi Gholam25-Sep-11 9:10 
GeneralRe: Do we need to promote SP's anymore? Pin
Mycroft Holmes25-Sep-11 12:44
professionalMycroft Holmes25-Sep-11 12:44 
GeneralRe: Do we need to promote SP's anymore? Pin
PIEBALDconsult25-Sep-11 6:01
mvePIEBALDconsult25-Sep-11 6:01 
GeneralRe: Do we need to promote SP's anymore? Pin
PIEBALDconsult25-Sep-11 5:57
mvePIEBALDconsult25-Sep-11 5:57 
GeneralRe: Do we need to promote SP's anymore? Pin
Mycroft Holmes25-Sep-11 12:43
professionalMycroft Holmes25-Sep-11 12:43 
AnswerRe: Do we need to promote SP's anymore? Pin
PIEBALDconsult25-Sep-11 5:31
mvePIEBALDconsult25-Sep-11 5:31 
AnswerRe: Do we need to promote SP's anymore? Pin
Jörgen Andersson25-Sep-11 10:12
professionalJörgen Andersson25-Sep-11 10:12 
About security: No real difference if you use parameterized queries.

About performance: When the query is compiled there should normally be no difference.
But, a stored procedure is precompiled, so the time to optimize and compile the query can be written off for the SP. This is sometimes a larger part of the execution time. (Yes, I know that most DBs nowadays cache the execution plans).
On the other hand, with a precompiled SP you will always have the same execution plan. This is obviously not always optimal. Think for example of the LIKE or IN clauses. They might need very different scanning of the indexes depending on the parameters supplied.

They lock you down to a vendor: So does dotnet.

And a couple of pros and cons from me:
Making dynamic SQL in a SP is a complete PITA IMAO.
Think of the roundtrip time from your application to the DBServer. This can sometimes be a serious bottleneck

GeneralRe: Do we need to promote SP's anymore? Pin
_Maxxx_29-Sep-11 0:29
professional_Maxxx_29-Sep-11 0:29 
GeneralRe: Do we need to promote SP's anymore? Pin
Jörgen Andersson29-Sep-11 8:16
professionalJörgen Andersson29-Sep-11 8:16 
AnswerRe: Do we need to promote SP's anymore? Pin
Eddy Vluggen25-Sep-11 10:39
professionalEddy Vluggen25-Sep-11 10:39 
GeneralRe: Do we need to promote SP's anymore? Pin
PIEBALDconsult25-Sep-11 14:20
mvePIEBALDconsult25-Sep-11 14:20 
GeneralRe: Do we need to promote SP's anymore? Pin
Mycroft Holmes25-Sep-11 16:07
professionalMycroft Holmes25-Sep-11 16:07 
GeneralRe: Do we need to promote SP's anymore? Pin
Eddy Vluggen26-Sep-11 12:19
professionalEddy Vluggen26-Sep-11 12:19 
QuestionMySQL 5.2.34 CE Pin
Emejulu JVT24-Sep-11 8:34
Emejulu JVT24-Sep-11 8:34 
AnswerRe: MySQL 5.2.34 CE Pin
André Kraak24-Sep-11 8:55
André Kraak24-Sep-11 8:55 
Questiongenerating IDs with IDENTITY() in sql server 2005 Pin
Danzy8321-Sep-11 11:59
Danzy8321-Sep-11 11:59 
AnswerRe: generating IDs with IDENTITY() in sql server 2005 Pin
PIEBALDconsult21-Sep-11 14:25
mvePIEBALDconsult21-Sep-11 14:25 
AnswerRe: generating IDs with IDENTITY() in sql server 2005 PinPopular
Mycroft Holmes21-Sep-11 16:09
professionalMycroft Holmes21-Sep-11 16:09 
GeneralRe: generating IDs with IDENTITY() in sql server 2005 Pin
David Skelly21-Sep-11 22:37
David Skelly21-Sep-11 22:37 
JokeRe: generating IDs with IDENTITY() in sql server 2005 Pin
Mycroft Holmes21-Sep-11 23:10
professionalMycroft Holmes21-Sep-11 23:10 
GeneralRe: generating IDs with IDENTITY() in sql server 2005 Pin
David Skelly22-Sep-11 1:38
David Skelly22-Sep-11 1:38 
GeneralRe: generating IDs with IDENTITY() in sql server 2005 Pin
PIEBALDconsult22-Sep-11 3:19
mvePIEBALDconsult22-Sep-11 3:19 
GeneralRe: generating IDs with IDENTITY() in sql server 2005 Pin
David Skelly22-Sep-11 6:04
David Skelly22-Sep-11 6:04 
GeneralRe: generating IDs with IDENTITY() in sql server 2005 Pin
Mycroft Holmes22-Sep-11 12:53
professionalMycroft Holmes22-Sep-11 12:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.