Re: Prepared statements considered harmful

From: "Zeugswetter Andreas DCP SD" <ZeugswetterA(at)spardat(dot)at>
To: "Peter Eisentraut" <peter_e(at)gmx(dot)net>, "Theo Schlossnagle" <jesus(at)omniti(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>, "Merlin Moncure" <mmoncure(at)gmail(dot)com>
Subject: Re: Prepared statements considered harmful
Date: 2006-09-01 10:44:18
Message-ID: E1539E0ED7043848906A8FF995BDA579014DBEBF@m0143.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> > I don't chime in very often, but I do think the refusal to
incorporate
> > hints into the planner system is fantastically stubborn and
> > nonsensical.
>
> What is actually fantastically nonsensical about this is that
> the issues I outlined about prepared statements would merely
> become worse if planner hints were used. Then, you wouldn't
> only have to worry about plans that were created earlier
> during the session, you would be faced with plans that were
> created earlier during the application's development. In
> general, the solutions to the prepared statement issues need
> to effect that the plans are created more often, not less often.

I have yet to see one of our partial Informix hints (where the planner
does it's
usual job only with one path with lowered/elevated costs) fall foul on
not anticipated change of underlying data.

Thus I don't buy the argument that hints are always bad.
Of course their use should be extremely rare and well thought out.
Most of the time sql tuning involves a concerted effort between the
programmer and a db performance expert, usually resulting in
rewritten sql or program logic without adding hints.

I can see arguments for hints the dba can set himself centrally on the
server,
but in my experience chances for substantial improvement are very
limited in that case.

Andreas

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Glaesemann 2006-09-01 10:54:57 Re: [HACKERS] Interval aggregate regression failure
Previous Message Stefan Kaltenbrunner 2006-09-01 10:40:53 Re: [pgsql-advocacy] Thought provoking piece on