Re: Simple join optimized badly?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brian Herlihy <btherl(at)yahoo(dot)com(dot)au>
Cc: Postgresql Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Simple join optimized badly?
Date: 2006-10-11 02:38:29
Message-ID: 15661.1160534309@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Brian Herlihy <btherl(at)yahoo(dot)com(dot)au> writes:
> What would it take for hints to be added to postgres?

A *whole lot* more thought and effort than has been expended on the
subject to date.

Personally I have no use for the idea of "force the planner to do
exactly X given a query of exactly Y". You don't have exactly Y
today, tomorrow, and the day after (if you do, you don't need a
hint mechanism at all, you need a mysql-style query cache).
IMHO most of the planner mistakes we see that could be fixed via
hinting are really statistical estimation errors, and so the right
level to be fixing them at is hints about how to estimate the number
of rows produced for given conditions. Mind you that's still a plenty
hard problem, but you could at least hope that a hint of that form
would be useful for more than one query.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2006-10-11 02:50:19 Re: Scrub one large table against another
Previous Message Jim Nasby 2006-10-11 02:00:18 Re: [PERFORM] Postgre 8.0 Installation - Issues