Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Recoding a multi-sql-statement storedProc transaction in a script

by mpeppler (Vicar)
on Dec 15, 2004 at 16:00 UTC ( [id://415087]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Recoding a multi-sql-statement storedProc transaction in a script
in thread Recoding a multi-sql-statement storedProc transaction in a script

I'm with Thilosophy on this one.

Sure, you might need to have DBA (or DBO == database owner) privileges to manage stored procedures, but that's actually a good thing - there should be some control on what SQL is run against a server, but source control is simply done the same way as with any other language - store source files in CVS (or perforce, or...), and load the source files to production systems in a controled manner (just as you'd move perl code into production in a controled manner).

In terms of performance, my tests on Sybase show that stored procedures called as RPCs give the best performance because you don't have no SQL parsing overhead, and you usually don't have the query plan generation overhead either.

I agree that doing procedural processing in SQL is bad, but if you can perform your requests as set operations then you're ahead.

In addition, for Sybase at least it is important to keep transactions short, and wrapping them in a stored procedure is one way of achieving that.

Michael

  • Comment on Re^3: Recoding a multi-sql-statement storedProc transaction in a script

Replies are listed 'Best First'.
Re^4: Recoding a multi-sql-statement storedProc transaction in a script
by perrin (Chancellor) on Dec 15, 2004 at 20:14 UTC
    Good point, Sybase has different behavior with regard to performance of SQL parsing. Oracle doesn't get an advantage from stored procs because it caches the parsed statements already, but most people seem to use stored procs excusively with Sybase.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://415087]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-24 17:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found