Re: Prepared statements considered harmful

From: mark(at)mark(dot)mielke(dot)cc
To: Theo Schlossnagle <jesus(at)omniti(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Merlin Moncure <mmoncure(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: Prepared statements considered harmful
Date: 2006-08-31 15:27:18
Message-ID: 20060831152717.GC9491@mark.mielke.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 31, 2006 at 10:09:10AM -0400, Theo Schlossnagle wrote:
> There are many databases out there with better planners than
> PostgreSQL -- likely there will always be. Even those databases have
> query planner hints. Why? Because the authors of those database had
> the humility to realize that the planner they designed wasn't perfect
> and that people _still_ need their database to perform well despite a
> non-optimal query plan here and there.

> A good query planner hint system would act as a catalyst to the
> improvement of the current query planner as users could share their
> complex queries and associated improved query plans through hinting.

Would a hint system allow the planner to execute quicker? Eliminate
plans from consideration early, without evaluation how long they might
take to execute? Sort of possible today with toggling of the 'seqscan'
and other such options... :-)

> I like Postgres a lot, I think the people that work on it are very
> very sharp. I do feel that the consistent refusal to allow query
> hinting to be introduced demonstrates an unhealthy amount of hubris
> that, in the end, negatively impacts users.

Hubris isn't always bad. If hints were provided, the need for the
fully automatic planner to improve would be reduced. But yes, they do
seem to be competing goals, disenfranchising the user.

> While Postgres is missing a ton of other needed features, I rarely
> see the attitude that they are _unwanted_. Instead I see the "if it
> is important to you, go build it" attitude which is what I would
> expect in an open source project.

There is also "what you submit should be maintainable because we know
you might disappear at any time".

Cheers,
mark

--
mark(at)mielke(dot)cc / markm(at)ncf(dot)ca / markm(at)nortel(dot)com __________________________
. . _ ._ . . .__ . . ._. .__ . . . .__ | Neighbourhood Coder
|\/| |_| |_| |/ |_ |\/| | |_ | |/ |_ |
| | | | | \ | \ |__ . | | .|. |__ |__ | \ |__ | Ottawa, Ontario, Canada

One ring to rule them all, one ring to find them, one ring to bring them all
and in the darkness bind them...

http://mark.mielke.cc/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message AgentM 2006-08-31 15:36:36 Re: Prepared statements considered harmful
Previous Message mark 2006-08-31 15:22:33 Re: Prepared statements considered harmful