pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Number of function parameter
5+ messages / 3 participants
[nested] [flat]

* Number of function parameter
@ 2003-07-21 10:04  Arun Desai <Arundesai@kinera.com>
  0 siblings, 2 replies; 5+ messages in thread

From: Arun Desai @ 2003-07-21 10:04 UTC (permalink / raw)
  To: pgsql-jdbc

Hi,
     Why is that there is a maximum limit of 32 input parameters to the
Postgresql function?


      Whereas to my knowledge stored procedures in Oracle and SQL Server
take unlimited number of input arguments. So this puts extra burden on the
middleware developer to handle this stiuation at the time of migrating
existing databases in SQL Server or Oracle to Postgresql.


Thanks,
Arun Desai.





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Number of function parameter
@ 2003-07-21 10:23  Kris Jurka <books@ejurka.com>
  parent: Arun Desai <Arundesai@kinera.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Kris Jurka @ 2003-07-21 10:23 UTC (permalink / raw)
  To: Arun Desai <Arundesai@kinera.com>; +Cc: pgsql-jdbc



On Mon, 21 Jul 2003, Arun Desai wrote:

> Hi,
>      Why is that there is a maximum limit of 32 input parameters to the
> Postgresql function?

The backend's internals are limited in this way.  If you compile from
source you can change this limit by altering INDEX_MAX_KEYS.  Search the
archives for more details.

Kris Jurka




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Number of function parameter
@ 2003-07-21 11:32  Kris Jurka <books@ejurka.com>
  parent: Arun Desai <Arundesai@kinera.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Kris Jurka @ 2003-07-21 11:32 UTC (permalink / raw)
  To: Arun Desai <Arundesai@kinera.com>; +Cc: pgsql-jdbc



On Mon, 21 Jul 2003, Arun Desai wrote:

> Kris,
>         Would it have any implication on the database in terms of
> performance etc.,. if I change INDEX_MAX_KEYS to a number greater than 32,
> compile the sources and run the database?
>

Yes, otherwise it would be set to a higher value.  That said the
performance decrease shouldn't be that bad.  The following tests were made
during the change from 16 to 32 and are supposed to demonstrate the worst
case scenario, fast functions being invoked many times.  I couldn't say
what the real world impact to you is.

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&frame=right&rnum=11&thl=11900...

Kris Jurka






^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Number of function parameter
@ 2003-07-21 11:33  Arun Desai <Arundesai@kinera.com>
  parent: Kris Jurka <books@ejurka.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Arun Desai @ 2003-07-21 11:33 UTC (permalink / raw)
  To: Kris Jurka <books@ejurka.com>; +Cc: pgsql-jdbc

Kris,
        Would it have any implication on the database in terms of
performance etc.,. if I change INDEX_MAX_KEYS to a number greater than 32,
compile the sources and run the database?

Thanks,
Arun Desai.


----- Original Message -----
From: "Kris Jurka" <books@ejurka.com>
To: "Arun Desai" <Arundesai@kinera.com>
Cc: "pgsql-jdbc-list" <pgsql-jdbc@postgresql.org>
Sent: Monday, July 21, 2003 3:53 PM
Subject: Re: [JDBC] Number of function parameter


>
>
> On Mon, 21 Jul 2003, Arun Desai wrote:
>
> > Hi,
> >      Why is that there is a maximum limit of 32 input parameters to the
> > Postgresql function?
>
> The backend's internals are limited in this way.  If you compile from
> source you can change this limit by altering INDEX_MAX_KEYS.  Search the
> archives for more details.
>
> Kris Jurka
>
>
> ---------------------------(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




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Number of function parameter
@ 2003-07-21 18:10  scott.marlowe <scott.marlowe@ihs.com>
  parent: Arun Desai <Arundesai@kinera.com>
  1 sibling, 0 replies; 5+ messages in thread

From: scott.marlowe @ 2003-07-21 18:10 UTC (permalink / raw)
  To: Arun Desai <Arundesai@kinera.com>; +Cc: pgsql-jdbc

On Mon, 21 Jul 2003, Arun Desai wrote:

> Hi,
>      Why is that there is a maximum limit of 32 input parameters to the
> Postgresql function?
> 
> 
>       Whereas to my knowledge stored procedures in Oracle and SQL Server
> take unlimited number of input arguments. So this puts extra burden on the
> middleware developer to handle this stiuation at the time of migrating
> existing databases in SQL Server or Oracle to Postgresql.

Just remember, TANSTAAFL (There ain't no such thing as a free lunch)

in some way, you're paying for a limited or unlimited number of args, be 
it money, performance, flexibility.  for postgresql, the payment is that 
it gets pretty good performance on <=32 args, without a bunch of ugly code 
to handle "unlimited" args.  note that there's still a limit, even in 
Oracle, it's likely a performance enforced limit though, i.e. after 1024 
args the functions get so slow as to be unusable.




^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2003-07-21 18:10 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-07-21 10:04 Number of function parameter Arun Desai <Arundesai@kinera.com>
2003-07-21 10:23 ` Kris Jurka <books@ejurka.com>
2003-07-21 11:33   ` Arun Desai <Arundesai@kinera.com>
2003-07-21 11:32     ` Kris Jurka <books@ejurka.com>
2003-07-21 18:10 ` scott.marlowe <scott.marlowe@ihs.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox