Re: FE/BE protocol vs. parameterized queries

From: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
To: Michael Paesold <mpaesold(at)gmx(dot)at>
Cc: andrew(at)supernews(dot)com, postgres hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: FE/BE protocol vs. parameterized queries
Date: 2006-09-07 08:32:01
Message-ID: 1157617921.2402.35.camel@coppola.muc.ecircle.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Although I don't have a clear opinion myself, I sometimes read on this list
> that people are using prepared statements to get safe, stable plans, i.e.
> plans that don't depend on the specific parameter input.

I definitely want the possibility of getting stable plans. That's only
possible if the planner does NOT take into account any parameter values.
If the statistics get quicker out of date than it's practical to run
analyze, but the plans would stay stable, it's better not to have
parameter values taken into account.

> If you change that, I don't think they will be happy at all. I suggest
> leaving it as-is for 8.2. I think the user (i.e. driver) should be able to
> tell the backend, if they want planning for the first bind, or right at
> prepare.

That would be nice. We would probably use all 3 forms:
- unnamed statement: prepare based on constant parameters;
- named statement: prepare based on the first set of parameter values;
- named statement: prepare generic plan without considering parameter
values;

Cheers,
Csaba.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2006-09-07 09:07:48 Re: Win32 hard crash problem
Previous Message Jan de Visser 2006-09-07 05:58:48 Re: Build date for snapshots?