> One might think you'd gain similar advantages by doing a "prepare" on
your
> sql queries prior to running them, but preparing your SQL queries
prior to
> running them only really helps when you are going to run them more
than once
> during the same connection, and they provide no query optimization on
the
> database side, whereas stored procedures are compiled, optimized, and
stored
> in the db server's memory for later use by any process.

I could be wrong, but I think that with Oracle the queries you send will
be kept in the database's query cache, just as if they were saved as
stored procedures.  Using bind variables helps limit the number of
unique queries and keep things in the cache.  It doesn't really matter
though.  This discussion is really about stored procedures that have
application logic in them, not just saved SQL queries.

> I'm just saying that I don't see why it has to be so black and white
here.
> SPs are good; n-tier is good; in fact, it's all good, unless you
overindulge
> in any of it.

I don't think SPs are good.  That's why I raised this question: to hear
why other people think they are.

> One other question:  Why is this discussion happening on this
particular
> list?

There was a thread with several posts from people who seemed excited at
the prospect of writing SPs in perl.  I thought that was a strange thing
to want, so I asked why.

- Perrin

Reply via email to