Re: [HACKERS] Re: pgsql: Add missing optimizer hooks for function cost and number of rows.

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-committers(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Re: pgsql: Add missing optimizer hooks for function cost and number of rows.
Date: 2010-04-24 17:13:46
Message-ID: 1272129226.4161.1596.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Sat, 2010-04-24 at 12:59 -0400, Tom Lane wrote:

> Well, you did it without much thought at all.

To the consequences, definitely.

> I think this episode is a
> perfect demonstration of why we ask for concrete use-cases for proposed
> hooks. If you'd actually tried to write something that used the hook,
> you'd surely have noticed that it wasn't being passed the information
> that it would need to do anything useful, and you'd probably have
> recognized the problem that there's no good way for a single hook
> function to provide an extensible collection of function-specific
> knowledge.

To the value, no. The limitations of the hook approach were clear, but
they do at least allow overriding values on a session by session basis,
allowing you to write a program to estimate the result and then set the
function costs accordingly. It's not clever or the best way, but it was
the same situation as the other hooks currently provide and I imagined
it would be accepted without question, wrongly.

--
Simon Riggs www.2ndQuadrant.com

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2010-04-24 22:54:56 pgsql: Add C comments for recent to_char('L') fix for Win32.
Previous Message Tom Lane 2010-04-24 16:59:30 Re: [HACKERS] Re: pgsql: Add missing optimizer hooks for function cost and number of rows.

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-04-24 17:16:20 Re: global temporary tables
Previous Message Tom Lane 2010-04-24 16:59:30 Re: [HACKERS] Re: pgsql: Add missing optimizer hooks for function cost and number of rows.