Re: FUNCTIONS

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Aldo Leyva Alvarado <aleyva(at)medifarma(dot)com(dot)pe>
Cc: Søren Bentzen <soren(at)svendsvej(dot)dk>, <brew(at)theMode(dot)com>, <pgsql-php(at)postgresql(dot)org>
Subject: Re: FUNCTIONS
Date: 2004-03-19 15:48:58
Message-ID: Pine.LNX.4.33.0403190846190.14704-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

In Postgresql, the number of stored procedures isn't really an issue.
however, the efficiency of those stored procedures, and the table schema
they operate on is quite important.

Make sure your fk/pk relationships are of the same data type.
Make sure you aren't writing triggers that wind up being accidentally
recursive
Stored procedures in C are usually the fastest, but plpgsql and plsql are
both quite acceptable performers.

I would worry more about database tuning and proper design of the schema
than the stored procs. Make as many UDFs (user defined functions, the
postgresql name for a stored procedure, sorta) as you want, the number of
them won't be an issue.

On Wed, 17 Mar 2004, Aldo Leyva Alvarado wrote:

> I know that in other DB, if you have many Stored Procedure the perfomance
> could be reduce
>
> Aldo
> ----- Original Message -----
> From: "Søren Bentzen" <soren(at)svendsvej(dot)dk>
> To: "Aldo Leyva Alvarado" <aleyva(at)medifarma(dot)com(dot)pe>; "scott.marlowe"
> <scott(dot)marlowe(at)ihs(dot)com>
> Cc: <brew(at)theMode(dot)com>; <pgsql-php(at)postgresql(dot)org>
> Sent: Wednesday, March 17, 2004 4:54 PM
> Subject: Re: [PHP] FUNCTIONS
>
>
> > Hi
> > Should I understand your question like this one: How many stones are there
> > on the moon?
> > I am not shure that kind of question can answer with an exact number. I
> > presume it depends on factors like disk space, memory space and other
> > factors that can be adjusted. I think that a more relevant question could
> be
> > how big in bytes, a stored procedure can be?
> > And why do you want to know that, if the question can be answered?
> >
> > BR
> > Søren
> >
> > ----- Original Message -----
> > From: "Aldo Leyva Alvarado" <aleyva(at)medifarma(dot)com(dot)pe>
> > To: "scott.marlowe" <scott(dot)marlowe(at)ihs(dot)com>
> > Cc: <brew(at)theMode(dot)com>; <pgsql-php(at)postgresql(dot)org>
> > Sent: Wednesday, March 17, 2004 10:21 PM
> > Subject: Re: [PHP] FUNCTIONS
> >
> >
> > > Yes, I know, But I want to know how many STORED PROCEDURE supports
> > POSTGRES,
> > > maybe 100 or 500 or maybe more.
> > >
> > > Thanks
> > >
> > > ----- Original Message -----
> > > From: "scott.marlowe" <scott(dot)marlowe(at)ihs(dot)com>
> > > To: "Aldo Leyva Alvarado" <aleyva(at)medifarma(dot)com(dot)pe>
> > > Cc: <brew(at)theMode(dot)com>; <pgsql-php(at)postgresql(dot)org>
> > > Sent: Wednesday, March 17, 2004 11:22 AM
> > > Subject: Re: [PHP] FUNCTIONS
> > >
> > >
> > > > In Postgresql, a stored procedure is created using a user defined
> > > > function, and accessed with something simple like:
> > > >
> > > > select myfunc('arg1','arg2');
> > > >
> > > > So, it's just another select statement to PHP/Postgresql. You don't
> > have
> > > > to do anything fancy to hit a stored procedure.
> > > >
> > > > On Tue, 16 Mar 2004, Aldo Leyva Alvarado wrote:
> > > >
> > > > > Thanks,
> > > > > but I talked about to STORE PROCEDURE.
> > > > >
> > > > >
> > > > > Aldo Leyva
> > > > >
> > > > > ----- Original Message -----
> > > > > From: <brew(at)theMode(dot)com>
> > > > > To: <aleyva(at)medifarma(dot)com(dot)pe>
> > > > > Cc: <pgsql-php(at)postgresql(dot)org>
> > > > > Sent: Monday, March 15, 2004 10:33 PM
> > > > > Subject: Re: [PHP] FUNCTIONS
> > > > >
> > > > >
> > > > > >
> > > > > > Aldo......
> > > > > >
> > > > > > > Can you tell me how many functions supports POSTGRES?
> > > > > >
> > > > > > I'm not going to count them, but you can total them up and read
> all
> > > about
> > > > > > them in Chapter LXXXIV of the php manual, entitled PostgreSQL
> > > Functions.
> > > > > > The url is:
> > > > > >
> > > > > > http://us4.php.net/manual/en/ref.pgsql.php
> > > > > >
> > > > > > Or another of the mirrors.
> > > > > >
> > > > > > brew
> > > > > >
> > > > > >
> > > > > > ---------------------------(end of
> > > broadcast)---------------------------
> > > > > > TIP 6: Have you searched our list archives?
> > > > > >
> > > > > > http://archives.postgresql.org
> > > > >
> > > > > ---------------------------(end of
> > broadcast)---------------------------
> > > > > TIP 1: subscribe and unsubscribe commands go to
> > majordomo(at)postgresql(dot)org
> > > > >
> > > >
> > > >
> > > > ---------------------------(end of
> broadcast)---------------------------
> > > > TIP 1: subscribe and unsubscribe commands go to
> majordomo(at)postgresql(dot)org
> > >
> > >
> > > ---------------------------(end of broadcast)---------------------------
> > > TIP 9: the planner will ignore your desire to choose an index scan if
> your
> > > joining column's datatypes do not match
> > >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 2: you can get off all lists at once with the unregister command
> > (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Rod K 2004-03-22 15:39:54 Re: Problems compiling for pgsql support
Previous Message Frank Finner 2004-03-19 10:58:39 Re: running postgresql as a linux service