Re: little off-topic: stored procedures

From: Laszlo Hornyak <hornyakl(at)rootshell(dot)be>
To: Curt Sampson <cjs(at)cynic(dot)net>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: little off-topic: stored procedures
Date: 2002-09-11 08:35:08
Message-ID: 20020911103508.A29854@phenix.rootshell.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi!

One reason to use stored procedures:
Reduces the number of the required interactions between the DB and the client. It may result better response time for the clients, and still lower load on the server.
Did you ever try to port your more difficult system to MySQL? :)
I did, postgres did with 1 sql statement, what MySQL did with 7-8. The throughput was similar.

It was the SQL problem, each vendor implemented differently, so stored procedures are the less portable things I have ever seen. If the java stored procedures will be implemented, we will be able to emulate the stored procedure systems of comercial databases easyly.

Laszlo Hornyak

On Wed, Sep 11, 2002 at 02:02:25PM +0900, Curt Sampson wrote:
> On Tue, 10 Sep 2002, Clinton Adams wrote:
>
> > I like having sql outside of the java code but i'm not crazy about stored
> > procedures - you can check out an alternative approach to stored procedures
> > and embedded sql at http://www.ibatis.com/jpetstore/jpetstore.html
> >
> > On Sun September 8 2002 11:35, Felipe Schnack graced us with the following -
> > > I'm right now choosing the design patterns for an web portal for an
> > > academic institution. I just started a philosofical discussion about how we
> > > will do database access. I was thinking about use stored procedures
> > > extensively, but some people says me I should avoid them whenever possible,
> > > and put the business logic in Java. What you all think about it?
>
> Personally, I like having it right in the Java, for several reasons.
>
> 1. You don't have to go look into another file to see what's going on.

Is this the thing called "spagetti-code"?

>
> 2. When you build your code, you know exactly what SQL will be running.
> Otherwise you get whatever is in the database at that particular time,
> which might be different from what you think it is.
>
> 3. Rolling it into production is generally easier, because you can
> just roll out the Java stuff, without worrying about rolling out
> new code into the database at the same time.
>
> cjs
> --
> Curt Sampson <cjs(at)cynic(dot)net> +81 90 7737 2974 http://www.netbsd.org
> Don't you know, in this new Dark Age, we're all light. --XTC
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Teofilis Martisius 2002-09-11 09:57:35 new String(byte[]) performance
Previous Message Barry Lind 2002-09-11 05:44:16 Re: BlobOutputStream patch and related patches