Re: [PATCHES] [SQL] 16 parameter limit

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, josh(at)agliodbs(dot)com, jproctor(at)prium(dot)net, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] [SQL] 16 parameter limit
Date: 2002-04-16 05:06:50
Message-ID: 200204160506.g3G56oV12346@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches pgsql-sql

Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > How about this: We store the first 16 parameters in some fixed array for
> > fast access like now, and when you have more than 16 then 17 and beyond
> > get stored in some variable array in pg_proc.
>
> <<itch>> What's this going to cost us in the function lookup code paths?
>
> If we can do it with little or no performance cost (at least for the
> "normal case" of fewer-than-N parameters) then I'm all ears.

OK, I have an idea. Tom, didn't you just add code that allows the cache
to return multiple rows for a lookup? I think you did it for schemas.

What if we lookup on the first 16 params, then look at every matching
hit if there are more than 16 params supplied? Another idea would be to
hash the function arg types and look that up rather than looking for
exact matches of oidvector.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-04-16 05:11:19 Re: Firebird 1.0 released
Previous Message Curt Sampson 2002-04-16 05:05:25 Re: Importing Large Amounts of Data

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2002-04-16 05:15:11 Re: [PATCHES] YADP - Yet another Dependency Patch
Previous Message Tom Lane 2002-04-16 05:01:33 Re: [PATCHES] [SQL] 16 parameter limit

Browse pgsql-sql by date

  From Date Subject
Next Message KeithR 2002-04-16 14:10:17 help - JOIN problem
Previous Message Tom Lane 2002-04-16 05:01:33 Re: [PATCHES] [SQL] 16 parameter limit