IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Well, it depends
on what you're trying to do. Do you want to have your stored procedures to be nothing more than a single SELECT, UPDATE or DELETE statement? You can if you want to. They're big on that here at my current employer. But then, you might as well just execute the SQL command from your application and not have SPs at all.

The flip side is companies that want the business logic in SPs. For instance, I worked with a guy who interviewed with AIG years ago and he said that back then they had SPs that ran from 5,000 to 10,000 line long. In those SPs it absolutely makes sense to have the SQL code compiled and stored in the database.






"Chicago to my mind was the only place to be. ... I above all liked the city because it was filled with people all a-bustle, and the clatter of hooves and carriages, and with delivery wagons and drays and peddlers and the boom and clank of freight trains. And when those black clouds came sailing in from the west, pouring thunderstorms upon us so that you couldn't hear the cries or curses of humankind, I liked that best of all. Chicago could stand up to the worst God had to offer. I understood why it was built--a place for trade, of course, with railroads and ships and so on, but mostly to give all of us a magnitude of defiance that is not provided by one house on the plains. And the plains is where those storms come from."

-- E.L. Doctorow
New 5,000 to 10,000 lines long?
Amateurs.

The biggest one I've seen was 15K. Once you have that much PL/SQL you really get to experience at a visceral level all of the issues I mentioned in the other post.
Regards,
-scott
Welcome to Rivendell, Mr. Anderson.
New I still win
32K lines in a single C header file.
To be included in every program compiled.
On a slowwwwww machine.

No, I didn't write it.

Left the jobs within 2 weeks of being told I had to work for the guy who wrote it.
New Let me guess - No comments, too? ;-)
New Don't recall
If there was, they were stupider than the code.
New I remember looking at it...
When I did something for you... you had to show it to me...

No there were no comment and its was serious Cut and Paste.
New Hmmm.
Until you have some database code that, for every call, creates TCP sockets, makes external procedure calls (socket to process to C library, woo), builds up and tears down all of its package state (DBMS_SESSION.RESET_PACKAGE), logs megabytes of text per second, simulates synchronous calls using AQ with a 30 second timeout, stores data using comma delimited strings, XML, and UDTs, and generates HTML using string catenation in PLSQL... UNTIL then no, no you do not actually "win".

And no comments, natch.
Regards,
-scott
Welcome to Rivendell, Mr. Anderson.
Expand Edited by malraux June 25, 2011, 06:42:35 PM EDT
New :-)
New they were written over a dozen years ago
so they've probably grown since then ;-)




"Chicago to my mind was the only place to be. ... I above all liked the city because it was filled with people all a-bustle, and the clatter of hooves and carriages, and with delivery wagons and drays and peddlers and the boom and clank of freight trains. And when those black clouds came sailing in from the west, pouring thunderstorms upon us so that you couldn't hear the cries or curses of humankind, I liked that best of all. Chicago could stand up to the worst God had to offer. I understood why it was built--a place for trade, of course, with railroads and ships and so on, but mostly to give all of us a magnitude of defiance that is not provided by one house on the plains. And the plains is where those storms come from."

-- E.L. Doctorow
New Amateur
Even your simple select/update/delete statements should be stored procedures because then they'll be compiled and you'll avoid the overhead of query plan calculation on each call.

Or so I've been told. :-/
--

Drew
     Question on DB "best practices" - (drook) - (31)
         We don't even... - (folkert)
         Design coin flip - (jay)
         dumb datastore is easier to debug imho -NT - (boxley)
         Step away from the gun... - (malraux) - (17)
             Wow, not the response I was expecting - (drook) - (16)
                 Why that should not be in the DB: - (malraux) - (1)
                     Very interesting. Thanks for the detalied explanation. -NT - (Another Scott)
                 I wasn't expecting that trend, either. - (static) - (13)
                     Re: I wasn't expecting that trend, either. - (malraux) - (6)
                         I think I know what the problem is - (drook) - (4)
                             Paging is tricky. - (static)
                             Re: I think I know what the problem is - (malraux) - (2)
                                 Grid views, basically - (drook) - (1)
                                     Re: Grid views -- thoughts - (S1mon_Jester)
                         And ORMs have gotten better, too. - (static)
                     DB does have one key advantage here - (jay) - (5)
                         This -NT - (drook)
                         As scott said - (crazy) - (3)
                             Yes, this is where my preference is going now. - (static) - (2)
                                 There comes the moment when the constraints get dropped - (crazy) - (1)
                                     That's exactly why I want the App to know what to do! :-) -NT - (static)
         Well, it depends - (lincoln) - (9)
             5,000 to 10,000 lines long? - (malraux) - (7)
                 I still win - (crazy) - (5)
                     Let me guess - No comments, too? ;-) -NT - (Another Scott) - (2)
                         Don't recall - (crazy) - (1)
                             I remember looking at it... - (folkert)
                     Hmmm. - (malraux) - (1)
                         :-) -NT - (Another Scott)
                 they were written over a dozen years ago - (lincoln)
             Amateur - (drook)

Same thing we do every night, Pinky... try to take over the WORLD!
77 ms