Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Sql and Pl/sql --- Usage
"Ian Terence Botham" <botham_ian_at_hotmail.com> wrote in message
news:709f185b.0203212228.72e238a4_at_posting.google.com...
> Hello..
> As I was driving back from my work this evening.. I was thinking of
> something that has been on my mind for a long time.. I made a quick
> analysis/research of my code that I developed two years ago. Ok,, Here
> is what I found...
>
> I had this tendency to write pl/sql most often rather than sql even
> when the latter would really have mattered..(For instance...I
> preferred to write a pl/sql function when a decode would have been
> just perfect) But for some reason that can be attributed to the
> programing skills I imbibed back at my M.S program,, I felt that
> pl/sql would enable me create my own world. A pl/sql code would help
> me reuse the code, helps abstraction, to troubleshoot and maintains a
> definite approach in creating the logic....I only feel that SQL be a
> mailman getting the data to work upon..
>
> By resorting to pl/sql most of the time, am I delaying the
> query/processing performance any bit or taxing the database
> resources??if so .. how.. aren't we calling pl/sql functions(like
> decode, replace, translate, rtrim etc., ) in sql ???
>
> I did read thomas kyte one-on-one but thought I found some relevance
> to pl/sql and sql,which , however got derailed in narration...
>
> Thanks
> Ian.....
FWIW, My preference is to use SQL whenever possible, and resort to procedural code when it isn't. For example, to do pivots and so forth, I'd use decode rather than user defined functions.
I'm sure MJB would support this view.
HTH.
Paul
Received on Fri Mar 22 2002 - 14:23:26 CST