Re: [HACKERS] Hints proposal

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Bucky Jordan <bjordan(at)lumeta(dot)com>
Cc: josh(at)agliodbs(dot)com, "Jim C(dot) Nasby" <jim(at)nasby(dot)net>, pgsql-hackers(at)postgresql(dot)org, pgsql-performance(at)postgresql(dot)org
Subject: Re: [HACKERS] Hints proposal
Date: 2006-10-12 22:02:07
Message-ID: 20061012220207.GI18764@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

Bucky Jordan wrote:

> What about using regular expressions, plus, if you have a function
> (views, or any other statement that is stored), you can assign a rule to
> that particular function. So you get matching, plus explicit selection.
> This way it's easy to find all your hints, turn them off, manage them,
> etc. (Not to mention dynamically generated SQL is ugly enough without
> having to put hints in there).

The regular expression idea that's being floated around makes my brain
feel like somebody is screeching a blackboard nearby. I don't think
it's a sane idea. I think you could achieve something similar by using
stored plan representations, like we do for rewrite rules. So you'd
look for, say, a matching join combination in a catalog, and get a
selectivity from a function that would get the selectivities of the
conditions on the base tables. Or something like that anyway.

That gets ugly pretty fast when you have to extract selectivities for
all the possible join paths in any given query.

But please don't talk about regular expressions.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-10-12 22:03:38 Re: New version of money type
Previous Message Richard Broersma Jr 2006-10-12 21:41:11 Re: Hints proposal

Browse pgsql-performance by date

  From Date Subject
Next Message Mark Kirkwood 2006-10-12 22:07:32 Re: FW: Simple join optimized badly?
Previous Message Richard Broersma Jr 2006-10-12 21:41:11 Re: Hints proposal